[pgpool-committers: 9920] pgpool: Fix "pgpool reset" command not working if watchdog is enabled.

Tatsuo Ishii ishii at sraoss.co.jp
Mon Jun 10 13:30:34 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_2_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=908e20dddd912f3c95bb28b644acf5b9588789c1

Modified Files
--------------
src/config/pool_config.c                       | 453 +++++++++++++------------
src/config/pool_config.l                       |   4 +-
src/include/pool_config.h                      |   4 +-
src/test/regression/tests/004.watchdog/test.sh |  17 +-
4 files changed, 251 insertions(+), 227 deletions(-)



More information about the pgpool-committers mailing list