Re: logs of postgresql and pid-stamping. possible improvement?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: logs of postgresql and pid-stamping. possible improvement?
Дата
Msg-id 29819.1029435194@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: logs of postgresql and pid-stamping. possible improvement?  (Andrew Sullivan <andrew@libertyrms.info>)
Ответы Re: logs of postgresql and pid-stamping. possible  (Larry Rosenman <ler@lerctr.org>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: logs of postgresql and pid-stamping. possible improvement?
Следующее
От: Larry Rosenman
Дата:
Сообщение: Re: logs of postgresql and pid-stamping. possible