Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfbc7f59

Browse files
committed
If test postmaster fails to start within 60 seconds, try to kill -9 it
so that it won't interfere with later trials. Per recent buildfarmexperience. Anyone know how to do this on Windows?
1 parenta1dad99 commitfbc7f59

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.19 2006/08/01 18:01:36 momjian Exp $
14+
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.20 2006/08/13 20:39:07 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -1552,9 +1552,25 @@ main(int argc, char *argv[])
15521552

15531553
pg_usleep(1000000L);
15541554
}
1555-
if (i==60)
1555+
if (i>=60)
15561556
{
1557-
fprintf(stderr,_("\n%s: postmaster did not start within 60 seconds\nExamine %s/log/postmaster.log for the reason\n"),progname,outputdir);
1557+
fprintf(stderr,_("\n%s: postmaster did not respond within 60 seconds\nExamine %s/log/postmaster.log for the reason\n"),progname,outputdir);
1558+
1559+
/*
1560+
* If we get here, the postmaster is probably wedged somewhere
1561+
* in startup. Try to kill it ungracefully rather than leaving
1562+
* a stuck postmaster that might interfere with subsequent test
1563+
* attempts.
1564+
*
1565+
* XXX is there a way to do this on Windows?
1566+
*/
1567+
#ifndefWIN32
1568+
if (kill(postmaster_pid,SIGKILL)!=0&&
1569+
errno!=ESRCH)
1570+
fprintf(stderr,_("\n%s: could not kill failed postmaster: %s\n"),
1571+
progname,strerror(errno));
1572+
#endif
1573+
15581574
exit_nicely(2);
15591575
}
15601576

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp