|
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 | +externpid_tSysLoggerPID; |
| 80 | + |
79 | 81 | /* GUC parameters */
|
80 | 82 | PGErrorVerbosityLog_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
|
|