Enhance status file reading log.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 15 Dec 2022 05:56:25 +0000 (14:56 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 15 Dec 2022 05:56:25 +0000 (14:56 +0900)
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

index acfcbd6f9c442f4fcf4c110098e1467af2fa16e8..4aba97ea6524e0c8423fbff010978acafa00bd4e 100644 (file)
@@ -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
                        {