diff --git a/doc/src/sgml/ref/pg_ctl-ref.sgml b/doc/src/sgml/ref/pg_ctl-ref.sgml index ba2646c4c4..10105e2524 100644 --- a/doc/src/sgml/ref/pg_ctl-ref.sgml +++ b/doc/src/sgml/ref/pg_ctl-ref.sgml @@ -117,6 +117,7 @@ PostgreSQL documentation -w -t seconds + -s -o options diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index e203c1299d..78f4cd3e54 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -163,6 +163,9 @@ write_eventlog(int level, const char *line) { static HANDLE evtHandle = INVALID_HANDLE_VALUE; + if (silent_mode && level == EVENTLOG_INFORMATION_TYPE) + return; + if (evtHandle == INVALID_HANDLE_VALUE) { evtHandle = RegisterEventSource(NULL, "PostgreSQL"); @@ -1276,6 +1279,9 @@ pgwin32_CommandLine(bool registration) /* concatenate */ sprintf(cmdLine + strlen(cmdLine), " -t %d", wait_seconds); + if (registration && silent_mode) + strcat(cmdLine, " -s"); + if (post_opts) { strcat(cmdLine, " ");