[pgpool-committers: 4329] pgpool: Fixing an issue in the handling of pg_terminate_backend()

Muhammad Usama m.usama at gmail.com
Thu Oct 26 01:05:01 JST 2017


Fixing an issue in the handling of pg_terminate_backend()

In some cases pg_terminate_backend() can cause failover even when
the call is properly issued through Pgpool-II.

This problem is, we do not set of the swallow_termination flag when the
pg_terminate_backend refers to the backend connection of the child
process on which the pg_terminate_backend() was issued.
This was due to the wrong assumption, that we always get the proper
socket close indication when backend to terminate is the same on which
pg_terminate_backend() is issued, Apparently this is not the case,
and PostgreSQL backend can still get abruptly killed even when it is
asked to terminate itself, And this abrupt termination of the connection
makes the Pgpool-II to consider it as a backend failure.

The solution to this is to always set the swallow_termination, even when the
pg_terminate_backend is referring to the local backend connection.

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=ce7ff5511937eea1277540158f5bbc30a0b88286

Modified Files
--------------
src/context/pool_process_context.c         | 25 -------------------------
src/include/context/pool_process_context.h |  1 -
src/protocol/pool_proto_modules.c          |  9 +--------
3 files changed, 1 insertion(+), 34 deletions(-)



More information about the pgpool-committers mailing list