[pgpool-general: 7020] Re: Pgpool is crashing when terminating user session
Tatsuo Ishii
ishii at sraoss.co.jp
Sun May 17 07:27:46 JST 2020
> Hi Tatsuo,
>
> Thanks for the update. I killed the application user session by directly
> connecting to the database using postgres user. As per your suggestion if
> we terminate any user session by connecting via pgpool, it will work fine
> Am i right?
Yes, exactly.
> pool_version
> ---------------------
> 4.0.4 (torokiboshi)
>
> version
>
> -------------------------------------------------------------------------------------------------------------------------------
> PostgreSQL 10.8 (Ubuntu 10.8-0ubuntu0.18.04.1) on x86_64-pc-linux-gnu,
> compiled by gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0, 64-bit
> (1 row)
>
>
> Thanks & Regards,
> Rajamohan.J
>
>
> On Sat, May 16, 2020 at 5:25 PM Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
>
>> > Hello all,
>> >
>> > We are having master-slave setup with pgpool pointing, only to master
>> > server. Whenever i tried to terminate the long running session on db end
>> > using SELECT pg_terminate_backend(pid), pgpool is getting crashed. Many
>> > blogs are saying this is the expected behaviour of pgpool, but my
>> question
>> > is there anyway to terminate unwanted sessions on db without loosing
>> other
>> > connections.
>> >
>> > Because restarting entire system every time for a single trouble causing
>> > session is a big hectic for us. Please share you ideas on this.
>>
>> Those blogs are incorrect. From Pgpool-II 3.6 Pgpool-II supports
>> pg_terminate_backend(). Are you sure that you use "SELECT
>> pg_terminate_backend(pid)" from Pgpool-II session, not from a session
>> directly connecting to PostgreSQL?
>>
>> Port 11000 is the port Pgpool-II is listening on.
>>
>> [killing session]
>>
>> $ psql -p 11000 test
>> psql (12.2)
>> Type "help" for help.
>>
>>
>> test=# select pg_terminate_backend(13877);
>> pg_terminate_backend
>> ----------------------
>> t
>> (1 row)
>>
>> [killed session]
>>
>> $ psql -p 11000 test
>> psql (12.2)
>> Type "help" for help.
>>
>> test=# select pg_sleep(600);
>> FATAL: terminating connection due to administrator command
>> ERROR: unable to forward message to frontend
>> DETAIL: FATAL error occured on backend
>> server closed the connection unexpectedly
>> This probably means the server terminated abnormally
>> before or while processing the request.
>> The connection to the server was lost. Attempting reset: Succeeded.
>> test=#
>>
>>
>> Best regards,
>> --
>> Tatsuo Ishii
>> SRA OSS, Inc. Japan
>> English: http://www.sraoss.co.jp/index_en.php
>> Japanese:http://www.sraoss.co.jp
>>
More information about the pgpool-general
mailing list