Re: [HACKERS] elog.c logic bug?

2007-06-06 Thread Andrew Dunstan



Tom Lane wrote:

Andrew Dunstan <[EMAIL PROTECTED]> writes:
  
If not I have missed something - why would the syslogger be trying to 
write to its output (possibly for the second time) regardless of what 
Log_destination is set to?



You're mistaken: within the syslogger process, stderr doesn't point to
the same place as the target file (it's normally the same as the
original postmaster stderr).  The reason the code is set up to try to
write both stderr and the target file is to maximize the chance that an
internally generated error in syslogger will get reported *someplace*.


  


OK, thanks, I'll try to make that a bit clearer in a comment.

cheers

andrew


---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org


Re: [HACKERS] elog.c logic bug?

2007-06-06 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes:
> If not I have missed something - why would the syslogger be trying to 
> write to its output (possibly for the second time) regardless of what 
> Log_destination is set to?

You're mistaken: within the syslogger process, stderr doesn't point to
the same place as the target file (it's normally the same as the
original postmaster stderr).  The reason the code is set up to try to
write both stderr and the target file is to maximize the chance that an
internally generated error in syslogger will get reported *someplace*.

regards, tom lane

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster