Fix bug #303.
authorTatsuo Ishii <ishii@postgresql.org>
Thu, 3 Aug 2017 02:52:24 +0000 (11:52 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Thu, 3 Aug 2017 05:14:02 +0000 (14:14 +0900)
commit626ef81eef7dacea78726340015cd59f1f4b65d0
treedd67fbf5fbe88cb6e8865791eb13ac2f9e51a38a
parente77c206d66fb0abe79533baf4f7f02a5cd8708ae
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.
child.c
main.c
pool.h
pool_stream.c
pool_stream.h
pool_worker_child.c