Fixed the streaming replication check process not to retry if it cannot connect to...
authorBo Peng <pengbo@sraoss.co.jp>
Thu, 10 Feb 2022 02:36:50 +0000 (11:36 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Thu, 10 Feb 2022 02:36:50 +0000 (11:36 +0900)
If the backend takes so long to respond, the connection times out,
then the streaming replication check process will continue to retry.
This retry causes a long time failover.

src/streaming_replication/pool_worker_child.c

index 4c7ef9d64c1d8473802f8367858db5c143bf3c19..686698a15039801f6c2edf700b299c7a2b7b666f 100644 (file)
@@ -207,7 +207,7 @@ static void establish_persistent_connection(void)
                                                                                          bkinfo->backend_port,
                                                                                          pool_config->sr_check_database,
                                                                                          pool_config->sr_check_user,
-                                                                                         pool_config->sr_check_password, true);
+                                                                                         pool_config->sr_check_password, false);
                }
        }
 }