[pgpool-committers: 4166] 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_4_STABLE

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

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



More information about the pgpool-committers mailing list