pgpool2.git / summary / log / commit / refs
commit e5f26774ec007313b2f7f0672e5f521d9a2c0fe8
Author: Takuma Hoshiai <hoshiai@sraoss.co.jp>
Date: Wed Apr 10 02:57:20 2019 +0000
Fix to compare wrong variable, when old pgpool_status file read.
Pgpool-II 3.4 or later, pgpool_status format changed, and format both old and new is supported.
Pgpool might read status in file incorrectly, when old format is reading by Pgpool.
This is rare case, and noproblem if it is happend.
src/main/pgpool_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c
index 6695ebd7e..6cee6e6b5 100644
--- a/src/main/pgpool_main.c
+++ b/src/main/pgpool_main.c
@@ -3716,8 +3716,8 @@ read_status_file(bool discard_status)
ereport(LOG,
(errmsg("read_status_file: %d th backend is set to down status", i)));
}
- else if (BACKEND_INFO(i).backend_status == CON_CONNECT_WAIT ||
- BACKEND_INFO(i).backend_status == CON_UP)
+ else if (backend_rec.status[i] == CON_CONNECT_WAIT ||
+ backend_rec.status[i] == CON_UP)
{
BACKEND_INFO(i).backend_status = CON_CONNECT_WAIT;
pool_set_backend_status_changed_time(i);
[parent: 39b39effea92]