Increase fixed waits in "pg_ctl start -w" from 5 seconds to 10.
authorTom Lane <[email protected]>
Sun, 19 Jun 2016 18:01:17 +0000 (14:01 -0400)
committerTom Lane <[email protected]>
Sun, 19 Jun 2016 18:01:17 +0000 (14:01 -0400)
In the 9.1 branch only, modify test_postmaster_connection() so that it
will wait up to 10 seconds, not 5, for the postmaster pid file to appear.
This is a much simpler and safer, if less complete, way of addressing
the buildfarm instability issues we hoped to solve with c869a7d5b.

Discussion: <20160618042812[email protected]>

src/bin/pg_ctl/pg_ctl.c

index 817c37dc643c0a06baa9d90ba036c1e70fac7029..45db82a8affff612c3af2cb456dd4203f66d8126 100644 (file)
@@ -607,7 +607,7 @@ test_postmaster_connection(bool do_checkpoint)
                                                 * timeout first.
                                                 */
                                                snprintf(connstr, sizeof(connstr),
-                                               "dbname=postgres port=%d host='%s' connect_timeout=5",
+                                               "dbname=postgres port=%d host='%s' connect_timeout=10",
                                                                 portnum, host_str);
                                        }
                                }
@@ -624,14 +624,14 @@ test_postmaster_connection(bool do_checkpoint)
 
                /*
                 * The postmaster should create postmaster.pid very soon after being
-                * started.  If it's not there after we've waited 5 or more seconds,
+                * started.  If it's not there after we've waited 10 or more seconds,
                 * assume startup failed and give up waiting.  (Note this covers both
                 * cases where the pidfile was never created, and where it was created
                 * and then removed during postmaster exit.)  Also, if there *is* a
                 * file there but it appears stale, issue a suitable warning and give
                 * up waiting.
                 */
-               if (i >= 5)
+               if (i >= 10)
                {
                        struct stat statbuf;