<div dir="auto">Thanks a lot for the patch have a great weekend</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 7 May 2022 at 13:35 Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">> Hi,<br>
> <br>
> Still thinking.<br>
> <br>
> Best reagards,<br>
> --<br>
> Tatsuo Ishii<br>
> SRA OSS, Inc. Japan<br>
> English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
> Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
> <br>
> <br>
>> Hi,<br>
>> <br>
>> Any news about this thread?<br>
>> <br>
>> Thanks,<br>
>> Avi.<br>
>> <br>
>> On Mon, 25 Apr 2022 at 11:13 Avi Raboah <<a href="mailto:avi.raboah@gmail.com" target="_blank">avi.raboah@gmail.com</a>> wrote:<br>
>> <br>
>>> It will be perfect thanks a lot!<br>
>>><br>
>>> On Mon, 25 Apr 2022 at 10:47 Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>> wrote:<br>
>>><br>
>>>> > No, it doesn't.<br>
>>>> > In that case when you make the select statement, piggy internal queries<br>
>>>> > failed and the session rebooted<br>
>>>><br>
>>>> I see it now.<br>
>>>><br>
>>>> test=# begin;<br>
>>>> BEGIN<br>
>>>> test=*# insert into ttt values(1);<br>
>>>> ERROR: relation "ttt" does not exist<br>
>>>> LINE 1: insert into ttt values(1);<br>
>>>> ^<br>
>>>> test=!# select * from t1;<br>
>>>> FATAL: Backend throw an error message<br>
>>>> DETAIL: Exiting current session because of an error from backend<br>
>>>> HINT: BACKEND Error: "current transaction is aborted, commands ignored<br>
>>>> until end of transaction block"<br>
>>>> server closed the connection unexpectedly<br>
>>>> This probably means the server terminated abnormally<br>
>>>> before or while processing the request.<br>
>>>> The connection to the server was lost. Attempting reset: Succeeded.<br>
>>>><br>
>>>> I think pgpool could remember that current transaction is in abort<br>
>>>> status and does not issue the piggyback query when the selec is<br>
>>>> issued. Let me see what we can do for this.<br>
<br>
I have come up with a patch. In this patch pgpool checks if current<br>
transaction is in abort status. If so, it does not accept new query at<br>
all and just reply back frontend with the message:<br>
<br>
"current transaction is aborted, commands ignored until end of transaction block"<br>
<br>
until commit or abort command is sent from frontend. After applying<br>
the patch the example session above looks like this:<br>
<br>
test=# begin;<br>
BEGIN<br>
test=*# insert into ttt values(1);<br>
ERROR: relation "ttt" does not exist<br>
LINE 1: insert into ttt values(1);<br>
^<br>
test=!# select * from t1;<br>
ERROR: current transaction is aborted, commands ignored until end of transaction block<br>
<br>
The patch was tested in master branch, but I believe it can be<br>
applied to 4.3 stable branch as well.<br>
<br>
Best reagards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
</blockquote></div></div>