Commit 5d5aedda authored by Magnus Hagander's avatar Magnus Hagander

Make sure pg_rewind can't run as root

Previously a warning was printed, but the tool actually kept running
even when running as root. This is something we definitely want to
prevent, but since this means a behavior change, not backpatching.

Author: Michael Paquier
parent a65e17bd
...@@ -208,6 +208,7 @@ main(int argc, char **argv) ...@@ -208,6 +208,7 @@ main(int argc, char **argv)
fprintf(stderr, _("cannot be executed by \"root\"\n")); fprintf(stderr, _("cannot be executed by \"root\"\n"));
fprintf(stderr, _("You must run %s as the PostgreSQL superuser.\n"), fprintf(stderr, _("You must run %s as the PostgreSQL superuser.\n"),
progname); progname);
exit(1);
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment