[pgpool-general: 3969] Re: How does one terminate/cancel queries via PGPool safely?

Pablo Sanchez pablo at blueoakdb.com
Sat Aug 15 12:18:37 JST 2015

[ Comments below, in-line ]

On 08/14/2015 10:51 PM, Tatsuo Ishii wrote:

Hi Tatsuo,

> You are right. Sorry I was wrong.

Bah!  Simple error.  ;)

> You can safely use pg_cancel_backend() with pgpool-II.


>> Under "Functionality of PostgreSQL" it states:
>>     If you use pg_terminate_backend() to stop a backend, this will
>>     trigger a failover.
> This is still correct. PostgreSQL returns the same error code when
> PostgreSQL is shutting down.

Hmmm.  I have some dumb questions on the above.  ;)

1) This one is really really dumb but ... here it goes ... could
    PGPool look at the error code and if it thinks PostgreSQL is
    shutting down, look at the corresponding command sent and if the
    string 'pg_terminate_backend()' is found in the string, not

    Perhaps make it controllable via a pgpool.conf parameter?

2) If the above isn't doable, how can we make PGPool disable sending

Thanks a lot!
Pablo Sanchez - Blueoak Database Engineering, Inc
Ph:    819.459.1926         Blog:  http://pablo-blog.blueoakdb.com
iNum:  883.5100.0990.1054

More information about the pgpool-general mailing list