Re: Logging SQL queries?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Logging SQL queries?
Дата
Msg-id 20020718220709.A7652@svana.org
обсуждение исходный текст
Ответ на Re: Logging SQL queries?  (Stephane Bortzmeyer <bortzmeyer@nic.fr>)
Ответы Re: Logging SQL queries?  (Ralph Graulich <maillist@shauny.de>)
Re: Logging SQL queries?  (Tom Jenkins <tjenkins@devis.com>)
Список 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 по дате отправления:

Предыдущее
От: Justin Clift
Дата:
Сообщение: SysAdmin magazine is doing a "Call for Papers" about Open Sourc
Следующее
От: trev@trev.co.nz (Trev)
Дата:
Сообщение: ERROR: bt_fixroot: not valid old root page