From: | Larry Rosenman <ler(at)lerctr(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Sullivan <andrew(at)libertyrms(dot)info>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: logs of postgresql and pid-stamping. possible |
Date: | 2002-08-15 18:16:43 |
Message-ID: | 1029435404.2995.3.camel@lerlaptop.iadfw.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 2002-08-15 at 13:13, Tom Lane wrote:
> Andrew Sullivan <andrew(at)libertyrms(dot)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(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
From | Date | Subject | |
---|---|---|---|
Next Message | Moritz Sinn | 2002-08-15 18:26:46 | writing own cast |
Previous Message | Tom Lane | 2002-08-15 18:13:14 | Re: logs of postgresql and pid-stamping. possible improvement? |