Re: logs of postgresql and pid-stamping. possible
От | Larry Rosenman |
---|---|
Тема | Re: logs of postgresql and pid-stamping. possible |
Дата | |
Msg-id | 1029435404.2995.3.camel@lerlaptop.iadfw.net обсуждение исходный текст |
Ответ на | Re: logs of postgresql and pid-stamping. possible improvement? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
On Thu, 2002-08-15 at 13:13, Tom Lane wrote: > 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. and with multi-line messages, it gives a message number-line number tag as well. (I remember putting in the smarter breakup code in 7.1 (IIRC)). LER -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
В списке pgsql-general по дате отправления: