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:02:38 +0000 (11:02 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Thu, 10 Feb 2022 02:28:07 +0000 (11:28 +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 59c0b58cbf0bf170e392841ff925ec801abeb142..9306a63157c04099daba01cad6cbd230f7b8fd25 100644 (file)
@@ -284,7 +284,7 @@ establish_persistent_connection(void)
                                                                                                                         bkinfo->backend_port,
                                                                                                                         pool_config->sr_check_database,
                                                                                                                         pool_config->sr_check_user,
-                                                                                                                        password ? password : "", true);
+                                                                                                                        password ? password : "", false);
                }
        }