mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
pg_ctl: Make failure to complete operation a nonzero exit
If an operation being waited for does not complete within the timeout, then exit with a nonzero exit status. This was previously handled inconsistently.
This commit is contained in:
@ -840,7 +840,9 @@ do_start(void)
|
||||
break;
|
||||
case POSTMASTER_STILL_STARTING:
|
||||
print_msg(_(" stopped waiting\n"));
|
||||
print_msg(_("server is still starting up\n"));
|
||||
write_stderr(_("%s: server did not start in time\n"),
|
||||
progname);
|
||||
exit(1);
|
||||
break;
|
||||
case POSTMASTER_FAILED:
|
||||
print_msg(_(" stopped waiting\n"));
|
||||
@ -1166,7 +1168,9 @@ do_promote(void)
|
||||
else
|
||||
{
|
||||
print_msg(_(" stopped waiting\n"));
|
||||
print_msg(_("server is still promoting\n"));
|
||||
write_stderr(_("%s: server did not promote in time\n"),
|
||||
progname);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user