8000 Increase fixed waits in "pg_ctl start -w" from 5 seconds to 10. · rtpg/postgres@354b3a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 354b3a3

Browse files
committed
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 c869a7d. Discussion: <20160618042812.5798.85609@wrigleys.postgresql.org>
1 parent d56c02f commit 354b3a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/pg_ctl/pg_ctl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ test_postmaster_connection(bool do_checkpoint)
607607
* timeout first.
608608
*/
609609
snprintf(connstr, sizeof(connstr),
610-
"dbname=postgres port=%d host='%s' connect_timeout=5",
610+
"dbname=postgres port=%d host='%s' connect_timeout=10",
611611
portnum, host_str);
612612
}
613613
}
@@ -624,14 +624,14 @@ test_postmaster_connection(bool do_checkpoint)
624624

625625
/*
626626
* The postmaster should create postmaster.pid very soon after being
627-
* started. If it's not there after we've waited 5 or more seconds,
627+
* started. If it's not there after we've waited 10 or more seconds,
628628
* assume startup failed and give up waiting. (Note this covers both
629629
* cases where the pidfile was never created, and where it was created
630630
* and then removed during postmaster exit.) Also, if there *is* a
631631
* file there but it appears stale, issue a suitable warning and give
632632
* up waiting.
633633
*/
634-
if (i >= 5)
634+
if (i >= 10)
635635
{
636636
struct stat statbuf;
637637

0 commit comments

Comments
 (0)
0