[pgpool-committers: 3774] pgpool: Fixing the issue with the watchdog process restart.
Muhammad Usama
m.usama at gmail.com
Fri Jan 20 01:10:50 JST 2017
Fixing the issue with the watchdog process restart.
When the watchdog process gets abnormally terminated because of some problem
(e.g. Segmentation fault) the new spawned watchdog process fails to start and
produces an error "bind on ... failed with reason: Address already in use".
Reason is the abnormally terminating watchdog process never gets the time to
clean-up the socket it uses for IPC and the new process gets an error because
the socket address is already occupied
Fix is, the Pgpool main process sets the flag in shared memory to mark the
watchdog process was abnormally terminated and at startup when the watchdog
process see that the flag is set, it performs the clean up of the socket file and
also performs the de-escalation (If the watchdog process was crashed when it
was master/coordinator node) if required before initializing itself.
Branch
------
V3_6_STABLE
Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=839a709bfd45c39293401ba1ff1c10e5b362cde2
Modified Files
--------------
src/include/watchdog/wd_ipc_commands.h | 7 ++++-
src/main/pgpool_main.c | 8 ++++++
src/watchdog/watchdog.c | 30 ++++++++++++++++-----
src/watchdog/wd_commands.c | 49 ++++++++++++++++++++++++++++++++++
4 files changed, 86 insertions(+), 8 deletions(-)
More information about the pgpool-committers
mailing list