[pgpool-committers: 1885] pgpool: Faulty logic of find_primary_node() function having pgtry-catch

Muhammad Usama m.usama at gmail.com
Wed May 7 20:27:25 JST 2014

Faulty logic of find_primary_node() function having pgtry-catch block inside the for-loop was causing
the find_primary_node() to return wrong primary node id, when an error is thrown from
make_persistent_db_connection() and for-loop gets terminated prematurely.
This check-in fixes the issue by creating the wrapper verify_backend_node_status()
over make_persistent_db_connection() and related logic of verifying backend node connectivity.
Hence removing the try-catch from find_primary_node() loop, which was the cause of problem.



Modified Files
src/main/pgpool_main.c  |  181 +++++++++++++++++++++++++++--------------------
src/watchdog/watchdog.c |    5 ++
2 files changed, 108 insertions(+), 78 deletions(-)

More information about the pgpool-committers mailing list