Andrew Sullivan <andrew@libertyrms.info> writes:
> Yes, but all that stuff with the ! at the beginning is associated
> with the LOG: QUERY STATISTICS ahead of it, no? Isn't that enough of
> a separator to make it clear? Or am I missing something (likely)?
He's concerned about query stats printed by concurrent backends becoming
interleaved in the log file. A fair concern, but I don't think it's
real, at least not since 7.2.
As of 7.2, the whole multiline stats message will be written in a
single write() call, so I'd be pretty surprised if it got interleaved
with other processes' messages. At least on HPUX, this is guaranteed
not to happen when stderr is a pipe, so if you're piping the postmaster
log to some kind of log rotation script then it ought to be quite safe.
Possibly if the log is a plain disk file there might be trouble on some
kernels.
If you're logging via syslog() then it's a different story: each line is
sent to syslog individually, I believe. But syslog already marks each
line with PID.
regards, tom lane