[pgpool-committers: 4171] pgpool: Fix bug #303.

Tatsuo Ishii ishii at postgresql.org
Thu Aug 3 14:28:54 JST 2017


Fix bug #303.

When failover is triggered by worker process, it is possible that
wrong DB node could failover. This is due to the db_node_id member in
the POLL_CONNECTION structure is not initialized in the process (in
child process the member is properly initialized). To solve the
problem, add new function pool_set_db_node_id() to set the structure
member variable and call it inside
make_persistent_db_connection(). For this purpose also the new
parameter "db_node_id" is added to make_persistent_db_connection and
friends.

Branch
------
V3_5_STABLE

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

Modified Files
--------------
src/include/pool.h                            |  4 ++--
src/include/utils/pool_stream.h               |  2 ++
src/main/pgpool_main.c                        |  4 ++--
src/protocol/child.c                          | 21 +++++++++++++--------
src/streaming_replication/pool_worker_child.c |  2 +-
src/utils/pool_stream.c                       | 10 ++++++++++
6 files changed, 30 insertions(+), 13 deletions(-)



More information about the pgpool-committers mailing list