Re: fix log_min_duration_statement logic error - Mailing list pgsql-patches

From Tom Lane
Subject Re: fix log_min_duration_statement logic error
Date
Msg-id 27177.1065451377@sss.pgh.pa.us
Whole thread Raw
In response to Re: fix log_min_duration_statement logic error  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: fix log_min_duration_statement logic error  (Alvaro Herrera Munoz <alvherre@dcc.uchile.cl>)
Re: fix log_min_duration_statement logic error  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Are those lines sent to the elog as one write() or separate ones --- do
> they always appear together in the log?

Currently they are sent in a single fprintf(stderr), which might or
might not be good enough to ensure atomicity.  We could hack this
to a direct write() if you don't mind depending on fileno(stderr),
but I think that'd create some portability issues on non-Unix
platforms.

If you're using syslog then I think all bets are off anyway.

> I had a new idea on output format.  Instead of converting newline to
> "\n", and double-escaping backslashes, we add a tab after any newline,

That's a thought... seems less invasive than the backslashing.  Not sure
how well it'll work for syslog output though.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: fix log_min_duration_statement logic error
Next
From: Alvaro Herrera Munoz
Date:
Subject: Re: fix log_min_duration_statement logic error