[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.

Branches
--------
EXCEPTION_MGR
master

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

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