Re: fix log_min_duration_statement logic error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Rod Taylor <rbt(at)rbt(dot)ca>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: fix log_min_duration_statement logic error
Date: 2003-10-06 14:42:57
Message-ID: 27177.1065451377@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera Munoz 2003-10-06 14:51:02 Re: fix log_min_duration_statement logic error
Previous Message Bruce Momjian 2003-10-06 14:21:06 Re: fix log_min_duration_statement logic error