aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-05-01 12:10:17 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-07-05 13:37:08 -0400
commit1bac5f552a25aca3aa2ef1d404f7cdf7788c34d8 (patch)
tree5ddec3336e872013219fbd4b204cf04a2377d270 /src
parentd80e73f2293429cf8a0a13c243852379ec2e37e2 (diff)
downloadpostgresql-1bac5f552a25aca3aa2ef1d404f7cdf7788c34d8.tar.gz
postgresql-1bac5f552a25aca3aa2ef1d404f7cdf7788c34d8.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_ctl/pg_ctl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index 0c65196bda4..4e02c4cea1a 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -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