Content-Length: 259015 | pFad | http://github.com/postgrespro/postgres_cluster/commit/94600dd4f47d4eb659e0c35cab0aeb257f89cbf1

71 pg_regress: Promptly detect failed postmaster startup. · postgrespro/postgres_cluster@94600dd · GitHub
Skip to content

Commit 94600dd

Browse files
committed
pg_regress: Promptly detect failed postmaster startup.
Detect it the way pg_ctl's wait_for_postmaster() does. When pg_regress spawned a postmaster that failed startup, we were detecting that only with "pg_regress: postmaster did not respond within 60 seconds". Back-patch to 9.4 (all supported versions). Reviewed by Tom Lane. Discussion: https://postgr.es/m/20181231172922.GA199150@gust.leadboat.com
1 parent d01e75d commit 94600dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/regress/pg_regress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2414,7 +2414,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
24142414
* Fail immediately if postmaster has exited
24152415
*/
24162416
#ifndef WIN32
2417-
if (kill(postmaster_pid, 0) != 0)
2417+
if (waitpid(postmaster_pid, NULL, WNOHANG) == postmaster_pid)
24182418
#else
24192419
if (WaitForSingleObject(postmaster_pid, 0) == WAIT_OBJECT_0)
24202420
#endif

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/94600dd4f47d4eb659e0c35cab0aeb257f89cbf1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy