summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2016-03-07 15:40:44 +0000
committerTom Lane2016-03-07 15:41:11 +0000
commit5a39c7395d2dcf44f62256ec05b66341149f222f (patch)
tree9403473c733e7ef2da278ac4f959ad065fedb50d
parentfe747b741d71a921c1a29f06902c73a263af7c65 (diff)
Fix backwards test for Windows service-ness in pg_ctl.
A thinko in a96761391 caused pg_ctl to get it exactly backwards when deciding whether to report problems to the Windows eventlog or to stderr. Per bug #14001 from Manuel Mathar, who also identified the fix. Like the previous patch, back-patch to all supported branches.
-rw-r--r--src/bin/pg_ctl/pg_ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index d90f24e7277..16aad55fe3c 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -216,7 +216,7 @@ write_stderr(const char *fmt,...)
* On Win32, we print to stderr if running on a console, or write to
* eventlog if running as a service
*/
- if (!pgwin32_is_service()) /* Running as a service */
+ if (pgwin32_is_service()) /* Running as a service */
{
char errbuf[2048]; /* Arbitrary size? */