[pgpool-committers: 5616] pgpool: Abort session if failover/failback is ongoing.
Tatsuo Ishii
ishii at sraoss.co.jp
Tue Apr 2 13:05:58 JST 2019
Abort session if failover/failback is ongoing.
If failover/failback is ongoing, there would be a risk that MASTER
node macro cannot be used. If used, it could raise a segfault because
connection to the master node is NULL or bogus.
There are several reports suspected to be caused by this (see bug 481,
482 for example).
Now the guts of the MASTER* macro (pool_virtual_master_db_node_id())
is modified to check Req_info->switching which is true while
failover/failback is ongoing. If true, emit warning message and exit
the process. There's still a small window I know, but this should
greatly reduce the chance to access bogus MASTER connection without
using any locking.
Branch
------
master
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=66b5aacfcc045ec1485921a5884b637fcfb6fd73
Modified Files
--------------
src/context/pool_query_context.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
More information about the pgpool-committers
mailing list