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

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

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

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



More information about the pgpool-committers mailing list