pgpool2.git / summary / log / commit / refs
commit 4cdbf4ef8aef570f1d9521a90d96a6e517d6e9ff
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Wed Apr 18 14:42:52 2018 +0000
Fix false primary node detection code.
The previous commit was wrong.
src/main/pgpool_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c
index ff563f3b7..a4b46b65d 100644
--- a/src/main/pgpool_main.c
+++ b/src/main/pgpool_main.c
@@ -3037,9 +3037,9 @@ verify_backend_node_status(POOL_CONNECTION_POOL_SLOT **slots)
backend_info = pool_get_node_info(i);
/* verify host and port */
- if ((*backend_info->backend_hostname == '/' && *host == '\0') ||
- (!strcmp(backend_info->backend_hostname, host) &&
- backend_info->backend_port == atoi(port)))
+ if (((*backend_info->backend_hostname == '/' && *host == '\0') ||
+ !strcmp(backend_info->backend_hostname, host)) &&
+ backend_info->backend_port == atoi(port))
{
/* the standby connects to the primary */
primary[i]++;
[parent: 54e749f8311c]