[pgpool-general: 5627] Re: pgpool get stuck pgproto scenario

Tatsuo Ishii ishii at sraoss.co.jp
Tue Jul 18 10:56:12 JST 2017


[Cc:ed to pgpool-general]

Yes, I got a stuck with your test script. In my case everything
(Pgpool-II and PostgreSQL servers) is on a same machine (thus using
local net). So it seems it's purely a matter of timing regardless the
network topology. I invested some cases and fixed Pgpool-II to deal
with them.

For example, it is possible the sync message frontend just sent has
not arrived Pgpool-II yet when Pgpool-II sees an error message from
backend. In this case Pgpool-II needs to wait till the sync message
arrives.

Another case is, when a sync message is received and it is forwarded
to backend, we need to wait for a ready for query message arrived from
backend.

Attached patch against 3.6 stable tree fixed the case you found (the
error case and non error case) in my side. Please test it with your
environment.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

From: Avi Weinberg <AviW at gilat.com>
Subject: RE: pgpool get stuck pgproto scenario
Date: Sun, 16 Jul 2017 15:16:30 +0000
Message-ID: <AM4PR07MB3476E8CF0648DAB28576F5DACBA30 at AM4PR07MB3476.eurprd07.prod.outlook.com>

> Hi Tatsuo Ishii,
> 
> Today I spent more time analyzing the "regular" queries (the ones that do not cause exceptions) that get stuck.
> 
> I noticed that when the pgpool with the VIP is running on the same machine as the pgproto then all goes well.  However, when the master pgpool (the one with the VIP) is on the other machine than it get stuck.
> 
> Also when I bypassed the VIP and used the physical machine's IP with pgpool port 9999 it also gave the same result.  If it was local IP it worked and if it was the partner's server ip it did not work
> 
> In addition, it did not matter on which server the primary postgres was.  Again if it was local IP it worked and if it was the partner's server ip it did not work
> 
> Can you please try the following with scripts and run pgproto from the machine that is not pgpool master (without the VIP)
> 
> Please let me know if you manage to simulate the problem.  You may open several terminals and run the script simultaneously so you will not need to wait long.
> 
> Thanks
> Avi
> 
> More info:
> 
> When it got stuck it printed one the following sequences:
> 
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE (a)
> 
> OR
> 
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE (f)
> 2017-07-16 07:59:22: <= BE (f)
> 
> 
> This is the sh script I ran
> 
> #!/bin/bash
> for ((n=0; n<50000; n++))
> do
>    echo "iteration $n "
>    pgproto -f /tmp/pgproto/trunk/bug318.data -p 9999 -h 172.18.255.40 -u postgres -d postgres;
> done
> 
> 
> and the data file was
> 
> 
> #
> # Test case for statement timeout patch.
> #
> 'Q'     "SET statement_timeout = '4s'"
> 
> # Receive response from backend
> 'Y'
> 
> # Execute statement which takes 3 seconds.
> 'P'     "S1"    "SELECT count(*) from pg_tables"        0
> 'B'     ""      "S1"    0       0       0
> 'E'     ""      0
> 'C'     'S'     "S1"
> 
> # Execute statement which takes 2 seconds.
> 'P'     "S2"    "SELECT * from pg_tables"       0
> 'B'     ""      "S2"    0       0       0
> 'E'     ""      0
> 'C'     'S'     "S2"
> 
> # Issue Sync message
> 'S'
> 
> # Receive response from backend
> 'Y'
> 
> # Send terminate message
> 'X'
> 
> 
> 
> 
> 
> 2017-07-16 07:48:48: iteration 1113
> 2017-07-16 07:48:48: FE=> Query(query="SET statement_timeout = '4s'")
> 2017-07-16 07:48:48: <= BE CommandComplete(SET)
> 2017-07-16 07:48:48: <= BE ReadyForQuery(I)
> 2017-07-16 07:48:48: FE=> Parse(stmt="S1", query="SELECT count(*) from pg_tables")
> 2017-07-16 07:48:48: FE=> Bind(stmt="S1", portal="")
> 2017-07-16 07:48:48: FE=> Execute(portal="")
> 2017-07-16 07:48:48: FE=> Close(stmt="S1")
> 2017-07-16 07:48:48: FE=> Parse(stmt="S2", query="SELECT * from pg_tables")
> 2017-07-16 07:48:48: FE=> Bind(stmt="S2", portal="")
> 2017-07-16 07:48:48: FE=> Execute(portal="")
> 2017-07-16 07:48:48: FE=> Close(stmt="S2")
> 2017-07-16 07:48:48: FE=> Sync
> 2017-07-16 07:48:48: <= BE ParseComplete
> 2017-07-16 07:48:48: <= BE BindComplete
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE CommandComplete(SELECT 1)
> 2017-07-16 07:48:48: <= BE CloseComplete
> 2017-07-16 07:48:48: <= BE ParseComplete
> 2017-07-16 07:48:48: <= BE BindComplete
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE DataRow
> 2017-07-16 07:48:48: <= BE (a)
> 
> 
> 2017-07-16 07:59:22: iteration 80
> 2017-07-16 07:59:22: FE=> Query(query="SET statement_timeout = '4s'")
> 2017-07-16 07:59:22: <= BE CommandComplete(SET)
> 2017-07-16 07:59:22: <= BE ReadyForQuery(I)
> 2017-07-16 07:59:22: FE=> Parse(stmt="S1", query="SELECT count(*) from pg_tables")
> 2017-07-16 07:59:22: FE=> Bind(stmt="S1", portal="")
> 2017-07-16 07:59:22: FE=> Execute(portal="")
> 2017-07-16 07:59:22: FE=> Close(stmt="S1")
> 2017-07-16 07:59:22: FE=> Parse(stmt="S2", query="SELECT * from pg_tables")
> 2017-07-16 07:59:22: FE=> Bind(stmt="S2", portal="")
> 2017-07-16 07:59:22: FE=> Execute(portal="")
> 2017-07-16 07:59:22: FE=> Close(stmt="S2")
> 2017-07-16 07:59:22: FE=> Sync
> 2017-07-16 07:59:22: <= BE ParseComplete
> 2017-07-16 07:59:22: <= BE BindComplete
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE CommandComplete(SELECT 1)
> 2017-07-16 07:59:22: <= BE CloseComplete
> 2017-07-16 07:59:22: <= BE ParseComplete
> 2017-07-16 07:59:22: <= BE BindComplete
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE DataRow
> 2017-07-16 07:59:22: <= BE (f)
> 2017-07-16 07:59:22: <= BE (f)
> 
> 
> From: Avi Weinberg
> Sent: Sunday, July 16, 2017 7:41 AM
> To: Tatsuo Ishii <ishii at sraoss.co.jp>
> Subject: Re: pgpool get stuck pgproto scenario
> 
> 
> Thank you very much for all your effort.  Itf is greatly appreciated.  Please feel free to share it with pgpool hackers.  Do you think the changes you made will also solve the problem with regular queries that sometimes (rare) also get stuck?
> 
> 
> 
> Thank you very much
> 
> Avi
> 
> 
> Sent from my LG Mobile
> 
> 
> 
> ------ Original message------
> 
> From: Tatsuo Ishii
> 
> Date: Sun, Jul 16, 2017 05:28
> 
> To: ishii at sraoss.co.jp<mailto:ishii at sraoss.co.jp>;
> 
> Cc: Avi Weinberg;
> 
> Subject:Re: pgpool get stuck pgproto scenario
> 
> 
> I got some progress and now the test fails at 24727 iteration out
> 50000.  Continue debugging...
> 
> I would like to share the test case with pgpool-hackers if you don't
> mind.
> 
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
> 
> From: Tatsuo Ishii <ishii at sraoss.co.jp<mailto:ishii at sraoss.co.jp>>
> Subject: Re: pgpool get stuck pgproto scenario
> Date: Fri, 14 Jul 2017 13:43:27 +0900 (JST)
> Message-ID: <20170714.134327.804532199193863482.t-ishii at sraoss.co.jp<mailto:20170714.134327.804532199193863482.t-ishii at sraoss.co.jp>>
> 
>>> Thank you very much for the quick reply. Did you use master and
>>> slave setup with load balancing?
>>
>> Yes. (actually, streaming replication mode). The installation was
>> created by pgpool_setup, that means Pgpool-II and PostgreSQL are all
>> on a same machine. pgpool.conf is attached. Pgpool-II version is
>> 3.6.4.
>>
>>> We know pgpool is reliable that is
>>> why I'm so surprise that we cannot run a full day without getting
>>> stuck queries.  Can you please change the selects in the data file
>>> to "select 1/0".
>>
>> I did it and the script stucks at iteration 84. I will invest the problem.
>>
>>> If 50000 iterations will pass it means that
>>> something on our setups and developers pc is causing pgpool to get
>>> stuck.  Can you please send us your pgpool.co<http://pgpool.co>nf
>>> postgresql.co<http://postgresql.co>nf. OS version hba files jdbc
>>> version and anything else that you might think can cause our
>>> configuration to get pgpool stuck.  In addition do you think running
>>> pgpool and postgres on the same machine can cause it?  Is it jdbc
>>> driver?
>>
>>>
>>> Your input is so much appreciated.
>>>
>>> Avi
>>>
>>>
>>> Sent from my LG Mobile
>>>
>>>
>>> ------ Original message------
>>>
>>> From: Tatsuo Ishii
>>>
>>> Date: Fri, Jul 14, 2017 02:29
>>>
>>> To: Avi Weinberg;
>>>
>>> Cc: ishii at sraoss.co.jp<mailto:ishii at sraoss.co.jp>;
>>>
>>> Subject:Re: pgpool get stuck pgproto scenario
>>>
>>>
>>> Thank you for providing the test case.
>>>
>>> Unfortunately I was not able to reproduce the problem.
>>>
>>> $ cat run_test.log
>>> 2017-07-14 08:14:50: iteration 49999
>>> 2017-07-14 08:14:50: FE=> Query(query="SET statement_timeout = '4s'")
>>> 2017-07-14 08:14:50: <= BE CommandComplete(SET)
>>> 2017-07-14 08:14:50: <= BE ReadyForQuery(I)
>>> 2017-07-14 08:14:50: FE=> Parse(stmt="S1", query="SELECT count(*) from pg_tables")
>>> 2017-07-14 08:14:50: FE=> Bind(stmt="S1", portal="")
>>> 2017-07-14 08:14:50: FE=> Execute(portal="")
>>> 2017-07-14 08:14:50: FE=> Close(stmt="S1")
>>> 2017-07-14 08:14:50: FE=> Parse(stmt="S2", query="SELECT * from pg_tables")
>>> 2017-07-14 08:14:50: FE=> Bind(stmt="S2", portal="")
>>> 2017-07-14 08:14:50: FE=> Execute(portal="")
>>> 2017-07-14 08:14:50: FE=> Close(stmt="S2")
>>> 2017-07-14 08:14:50: FE=> Sync
>>> 2017-07-14 08:14:50: <= BE ParseComplete
>>> 2017-07-14 08:14:50: <= BE BindComplete
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE CommandComplete(SELECT 1)
>>> 2017-07-14 08:14:50: <= BE CloseComplete
>>> 2017-07-14 08:14:50: <= BE ParseComplete
>>> 2017-07-14 08:14:50: <= BE BindComplete
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE DataRow
>>> 2017-07-14 08:14:50: <= BE CommandComplete(SELECT 62)
>>> 2017-07-14 08:14:50: <= BE CloseComplete
>>> 2017-07-14 08:14:50: <= BE ReadyForQuery(I)
>>> 2017-07-14 08:14:50: FE=> Terminate
>>>
>>> From: Avi Weinberg <AviW at gilat.com<mailto:AviW at gilat.com>>
>>> Subject: pgpool get stuck pgproto scenario
>>> Date: Thu, 13 Jul 2017 14:25:31 +0000
>>> Message-ID: <AM4PR07MB3476F30D78E4E74479698D4FCBAC0 at AM4PR07MB3476.eurprd07.prod.outlook.com<mailto:AM4PR07MB3476F30D78E4E74479698D4FCBAC0 at AM4PR07MB3476.eurprd07.prod.outlook.com>>
>>>
>>>> Hi Tatsuo Ishii,
>>>>
>>>> Thank you for the pgpool product and for your assistance in the past.
>>>>
>>>> I opened a bug http://www.pgpool.net/mantisbt/view.php?id=318 showing that exceptions get stuck with pgpool and not passed to the application.  I also sent the data file to simulate it with pgproto.  However, although it is less common, pgpool get stuck with also regular sql statements that do not cause exceptions such as select * from pg_tables and select count(*) from pg_tables.  Below please find the data file to simulate this case.
>>>>
>>>> We are working with pgpool for over a year, but to date we were not able to stabilize our solution that use pgpool.
>>>>
>>>> We would greatly appreciate if you could tell us if the following get stuck on your lab.  In addition please let us know what is the status of bug 318.  We tested it with pgpool 3.6.5 and the problem still exists.
>>>>
>>>> Thanks
>>>> Avi
>>>> 2017-07-13 10:06:13: iteration 1506
>>>> 2017-07-13 10:06:13: FE=> Query(query="SET statement_timeout = '4s'")
>>>> 2017-07-13 10:06:13: <= BE CommandComplete(SET)
>>>> 2017-07-13 10:06:13: <= BE ReadyForQuery(I)
>>>> 2017-07-13 10:06:13: FE=> Parse(stmt="S1", query="SELECT count(*) from pg_tables")
>>>> 2017-07-13 10:06:13: FE=> Bind(stmt="S1", portal="")
>>>> 2017-07-13 10:06:13: FE=> Execute(portal="")
>>>> 2017-07-13 10:06:13: FE=> Close(stmt="S1")
>>>> 2017-07-13 10:06:13: FE=> Parse(stmt="S2", query="SELECT * from pg_tables")
>>>> 2017-07-13 10:06:13: FE=> Bind(stmt="S2", portal="")
>>>> 2017-07-13 10:06:13: FE=> Execute(portal="")
>>>> 2017-07-13 10:06:13: FE=> Close(stmt="S2")
>>>> 2017-07-13 10:06:13: FE=> Sync
>>>> 2017-07-13 10:06:13: <= BE ParseComplete
>>>> 2017-07-13 10:06:13: <= BE BindComplete
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE CommandComplete(SELECT 1)
>>>> 2017-07-13 10:06:13: <= BE CloseComplete
>>>> 2017-07-13 10:06:13: <= BE ParseComplete
>>>> 2017-07-13 10:06:13: <= BE BindComplete
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE DataRow
>>>> 2017-07-13 10:06:13: <= BE ()
>>>>
>>>> ======== the data input file =============
>>>>
>>>> #
>>>> # Test case for statement timeout patch.
>>>> #
>>>> 'Q'     "SET statement_timeout = '4s'"
>>>>
>>>> # Receive response from backend
>>>> 'Y'
>>>>
>>>> 'P'     "S1"    "SELECT count(*) from pg_tables"       0
>>>> 'B'     ""      "S1"    0       0       0
>>>> 'E'     ""      0
>>>> 'C'     'S'     "S1"
>>>>
>>>> 'P'     "S2"    "SELECT * from pg_tables"        0
>>>> 'B'     ""      "S2"    0       0       0
>>>> 'E'     ""      0
>>>> 'C'     'S'     "S2"
>>>>
>>>> # Issue Sync message
>>>> 'S'
>>>>
>>>> # Receive response from backend
>>>> 'Y'
>>>>
>>>> # Send terminate message
>>>> 'X'
>>>>
>>>>
>>>>
>>>> ======== the shell script to run in a loop =============
>>>>
>>>>
>>>> #!/bin/bash
>>>>
>>>> File="./run_test.log"
>>>>
>>>> for ((n=0; n<50000; n++))
>>>> do
>>>> (
>>>>    echo "iteration $n "
>>>>    pgproto -f bug318.data -p 9999 -h 172.18.255.40 -u postgres -d postgres > $File;
>>>> ) 2>&1 | awk '{ print strftime("%Y-%m-%d %H:%M:%S:"), $0; fflush(); }' | tee -a "$File"
>>>>
>>>> if grep -q Terminate "$File"; then
>>>>    echo "ok"
>>>> else
>>>>    echo "Bug"
>>>>    exit
>>>> fi
>>>> done
>>>>
>>>>
>>>>
>>>>
>>>> IMPORTANT - This email and any attachments is intended for the above named addressee(s), and may contain information which is confidential or privileged. If you are not the intended recipient, please inform the sender immediately and delete this email: you should not copy or use this e-mail for any purpose nor disclose its contents to any person.
>>> IMPORTANT - This email and any attachments is intended for the above named addressee(s), and may contain information which is confidential or privileged. If you are not the intended recipient, please inform the sender immediately and delete this email: you should not copy or use this e-mail for any purpose nor disclose its contents to any person.
> IMPORTANT - This email and any attachments is intended for the above named addressee(s), and may contain information which is confidential or privileged. If you are not the intended recipient, please inform the sender immediately and delete this email: you should not copy or use this e-mail for any purpose nor disclose its contents to any person.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgpool-hung.diff
Type: text/x-patch
Size: 9560 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20170718/c4ff3954/attachment-0001.bin>


More information about the pgpool-general mailing list