Re: Logging SQL queries? - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Logging SQL queries?
Date
Msg-id 20020718220709.A7652@svana.org
Whole thread Raw
In response to Re: Logging SQL queries?  (Stephane Bortzmeyer <bortzmeyer@nic.fr>)
Responses Re: Logging SQL queries?  (Ralph Graulich <maillist@shauny.de>)
Re: Logging SQL queries?  (Tom Jenkins <tjenkins@devis.com>)
List pgsql-general
On Thu, Jul 18, 2002 at 12:16:01PM +0200, Stephane Bortzmeyer wrote:
> A related question: does anyone has a function to call syslog()? I
> would like to set up triggers which logs with the syslog system, but
> only some events (so debug_print_query is not for me).

Actually, this brings up a point. I was tracking down why the performance on
one of our servers running 7.2 was dismal. I eventually tracked to the
syslog() generated by postgres.

The thing is, when syslog logs a message it called sync() on the file
(unless explicitly disabled by prefixing the filename with a hyphen). So
with query logging it was calling sync() around 3 times per query, which not
surprisingly kills performance.

Has anyone else come across this or is it just me?
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

pgsql-general by date:

Previous
From: Justin Clift
Date:
Subject: SysAdmin magazine is doing a "Call for Papers" about Open Sourc
Next
From: trev@trev.co.nz (Trev)
Date:
Subject: ERROR: bt_fixroot: not valid old root page