[pgpool-committers: 4167] 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
------
master

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

Modified Files
--------------
src/include/pool.h                            |  4 ++--
src/include/utils/pool_stream.h               |  2 ++
src/main/health_check.c                       |  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 ++++++++++
7 files changed, 31 insertions(+), 14 deletions(-)



More information about the pgpool-committers mailing list