Re: Monitoring Postgres - Get the SQL queries which are sent to postgres

Поиск
Список
Период
Сортировка
От Vivek Khera
Тема Re: Monitoring Postgres - Get the SQL queries which are sent to postgres
Дата
Msg-id 90B34999-558F-4938-9278-2377338B266F@khera.org
обсуждение исходный текст
Ответ на Re: Monitoring Postgres - Get the SQL queries which are sent to postgres  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Список pgsql-general
On Oct 25, 2006, at 10:11 AM, A. Kretschmer wrote:

> Set this in your postgresql.conf:
>
> log_statement = all
>
> Reload the server, and then you can find all your statements in the
> log.

or, preferably, on a per-connection basis, execute this SQL statement:

set log_min_duration_statement = 0

then only those queries for that connection will be logged.
otherwise you get *way* too much stuff to sort out.

Another useful setting which I always enable (in my postgresql.conf
file) is

log_min_error_statement = error

so that any statement that generates an error will be appended to the
error log entry.  otherwise you just see the error notice and have no
clue what caused it.


Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Volkan YAZICI
Дата:
Сообщение: Re: more than 32 parameters to a function?
Следующее
От: David Fetter
Дата:
Сообщение: Re: more than 32 parameters to a function?