[pgpool-committers: 9921] pgpool: Fix "pgpool reset" command not working if watchdog is enabled.
Tatsuo Ishii
ishii at sraoss.co.jp
Mon Jun 10 13:30:39 JST 2024
Fix "pgpool reset" command not working if watchdog is enabled.
[pgpool-hackers: 4465] abnormal behavior about PGPOOL RESET. and proposal a patch file.
reported that "pgpool reset" command fails if watchdog is enabled.
test=# PGPOOL RESET client_idle_limit;
SET
ERROR: Pgpool node id file �y/pgpool_node_id does not exist
DETAIL: If watchdog is enable, pgpool_node_id file is required
message type 0x5a arrived from server while idle
message type 0x43 arrived from server while idle
message type 0x5a arrived from server while idle
SetPgpoolNodeId() tried to obtain the path to the node id file by
using global variable config_file_dir and failed because it points to
an automatic variable in ParseConfigFile().
To fix this, change the config_file_dir from a pointer to an array and
save the path string into config_file_dir in ParseConfigFile().
Also regression test is added to 004.watchdog.
Bug reported and problem analysis by keiseo.
Back patch to V4.2 in which the node id file was introduced.
Branch
------
V4_3_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=99ba3c4c02bbecbd7e2bc95155222493e376b5c1
Modified Files
--------------
src/config/pool_config.c | 465 +++++++++++++------------
src/config/pool_config.l | 4 +-
src/include/pool_config.h | 4 +-
src/test/regression/tests/004.watchdog/test.sh | 17 +-
4 files changed, 259 insertions(+), 231 deletions(-)
More information about the pgpool-committers
mailing list