From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr> |
Cc: | PostgreSQL General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Logging SQL queries? |
Date: | 2002-07-18 12:07:09 |
Message-ID: | 20020718220709.A7652@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)svana(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2002-07-18 12:10:46 | Re: Query Performance... |
Previous Message | Stephane Bortzmeyer | 2002-07-18 10:16:01 | Re: Logging SQL queries? |