1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

Increase fixed waits in "pg_ctl start -w" from 5 seconds to 10.

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.5798.85609@wrigleys.postgresql.org>
This commit is contained in:
Tom Lane
2016-06-19 14:01:17 -04:00
parent d56c02f1ac
commit 354b3a3ac8

View 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;