[pgpool-committers: 3372] pgpool: Fix for 218: Inconsistent status of Postgresql nodes in pgPool
Muhammad Usama
m.usama at gmail.com
Tue Aug 2 23:49:34 JST 2016
Fix for 218: Inconsistent status of Postgresql nodes in pgPool instances
after restart. Watchdog not syncing status.
Currently at the pgpool-II startup, The status of each configured backend node
is loaded from the backend status file or otherwise initialized by querying the
backend nodes. This technique works fine in stand alone mode and also with
the watchdog enabled as long as the status of backend nodes remains consistent
until all pgpool-II nodes got up and running.
But since pgpool-II does not sync the backend node status from the
watchdog cluster at startup time, so in some cases the pgpool-II nodes
participating in the watchdog cluster may get a different status for the same
backend, especially if the pgpool-II nodes part of the watchdog cluster starts
at different times and between that time an unavailable backend PostgreSQL node
had become available again.
So to solve this, the commit implements the new startup procedure for the
standby pgpool-II, And now the standby pgpool-II will load the backend status of
all configured PostgreSQL nodes from the watchdog master/coordinator node
at the time of startup.
Branch
------
master
Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=bda946e718fe6f3605eb7e82ada8754bd84a279c
Modified Files
--------------
src/include/watchdog/wd_ipc_commands.h | 2 +
src/include/watchdog/wd_ipc_defines.h | 4 +-
src/include/watchdog/wd_json_data.h | 19 ++++
src/main/pgpool_main.c | 87 +++++++++++++++++-
src/watchdog/watchdog.c | 155 +++++++++++++++++++++++++++++++--
src/watchdog/wd_commands.c | 96 ++++++++++++++++++--
src/watchdog/wd_json_data.c | 130 +++++++++++++++++++++++++++
7 files changed, 470 insertions(+), 23 deletions(-)
More information about the pgpool-committers
mailing list