From 57751f232a357d6fc694b8584a2747c864e0010c Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Thu, 15 Dec 2022 14:56:25 +0900 Subject: [PATCH] Enhance status file reading log. Previously only if pgpool_status exists and the status is down, a log message was printed. However it is more useful no matter what the status (up or unused) is because it also represents that pgpool_status exists and it is read while pgpool starting up, which is useful information. --- src/main/pgpool_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c index acfcbd6f9..4aba97ea6 100644 --- a/src/main/pgpool_main.c +++ b/src/main/pgpool_main.c @@ -3236,6 +3236,8 @@ read_status_file(bool discard_status) { BACKEND_INFO(i).backend_status = CON_UP; someone_wakeup = true; + ereport(LOG, + (errmsg("reading status file: %d th backend is set to up status", i))); } else if (!strncasecmp("down", readbuf, 4)) { @@ -3248,6 +3250,8 @@ read_status_file(bool discard_status) { BACKEND_INFO(i).backend_status = CON_UNUSED; pool_set_backend_status_changed_time(i); + ereport(LOG, + (errmsg("reading status file: %d th backend is set to unused status", i))); } else { -- 2.39.5