File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 3737 *
3838 *
3939 * IDENTIFICATION
40- * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.519 2007/02/10 14:58:54 petere Exp $
40+ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.520 2007/02/11 11:59:25 mha Exp $
4141 *
4242 * NOTES
4343 *
@@ -202,8 +202,8 @@ static pid_t StartupPID = 0,
202202 BgWriterPID = 0 ,
203203 AutoVacPID = 0 ,
204204 PgArchPID = 0 ,
205- PgStatPID = 0 ,
206- SysLoggerPID = 0 ;
205+ PgStatPID = 0 ;
206+ pid_t SysLoggerPID = 0 ; /* Needs to be accessed from elog.c */
207207
208208/* Startup/shutdown state */
209209#define NoShutdown 0
Original file line number Diff line number Diff line change 4242 *
4343 *
4444 * IDENTIFICATION
45- * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.181 2007/01/20 21:40:25 tgl Exp $
45+ * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.182 2007/02/11 11:59:26 mha Exp $
4646 *
4747 *-------------------------------------------------------------------------
4848 */
@@ -76,6 +76,8 @@ ErrorContextCallback *error_context_stack = NULL;
7676
7777sigjmp_buf * PG_exception_stack = NULL ;
7878
79+ extern pid_t SysLoggerPID ;
80+
7981/* GUC parameters */
8082PGErrorVerbosity Log_error_verbosity = PGERROR_VERBOSE ;
8183char * Log_line_prefix = NULL ; /* format for extra log line info */
@@ -1693,9 +1695,10 @@ send_message_to_server_log(ErrorData *edata)
16931695 * anything going there and write it to the eventlog instead.
16941696 *
16951697 * If stderr redirection is active, it's ok to write to stderr because
1696- * that's really a pipe to the syslogger process.
1698+ * that's really a pipe to the syslogger process. Unless we're in the
1699+ * postmaster, and the syslogger process isn't started yet.
16971700 */
1698- if ((!Redirect_stderr || am_syslogger ) && pgwin32_is_service ())
1701+ if ((!Redirect_stderr || am_syslogger || (! IsUnderPostmaster && SysLoggerPID == 0 ) ) && pgwin32_is_service ())
16991702 write_eventlog (edata -> elevel , buf .data );
17001703 else
17011704#endif
You can’t perform that action at this time.
0 commit comments