File tree 2 files changed +9
-6
lines changed 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 37
37
*
38
38
*
39
39
* 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 $
41
41
*
42
42
* NOTES
43
43
*
@@ -202,8 +202,8 @@ static pid_t StartupPID = 0,
202
202
BgWriterPID = 0 ,
203
203
AutoVacPID = 0 ,
204
204
PgArchPID = 0 ,
205
- PgStatPID = 0 ,
206
- SysLoggerPID = 0 ;
205
+ PgStatPID = 0 ;
206
+ pid_t SysLoggerPID = 0 ; /* Needs to be accessed from elog.c */
207
207
208
208
/* Startup/shutdown state */
209
209
#define NoShutdown 0
Original file line number Diff line number Diff line change 42
42
*
43
43
*
44
44
* 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 $
46
46
*
47
47
*-------------------------------------------------------------------------
48
48
*/
@@ -76,6 +76,8 @@ ErrorContextCallback *error_context_stack = NULL;
76
76
77
77
sigjmp_buf * PG_exception_stack = NULL ;
78
78
79
+ extern pid_t SysLoggerPID ;
80
+
79
81
/* GUC parameters */
80
82
PGErrorVerbosity Log_error_verbosity = PGERROR_VERBOSE ;
81
83
char * Log_line_prefix = NULL ; /* format for extra log line info */
@@ -1693,9 +1695,10 @@ send_message_to_server_log(ErrorData *edata)
1693
1695
* anything going there and write it to the eventlog instead.
1694
1696
*
1695
1697
* 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.
1697
1700
*/
1698
- if ((!Redirect_stderr || am_syslogger ) && pgwin32_is_service ())
1701
+ if ((!Redirect_stderr || am_syslogger || (! IsUnderPostmaster && SysLoggerPID == 0 ) ) && pgwin32_is_service ())
1699
1702
write_eventlog (edata -> elevel , buf .data );
1700
1703
else
1701
1704
#endif
You can’t perform that action at this time.
0 commit comments