Re: Tracking SQLs that update data

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Tracking SQLs that update data
Дата
Msg-id AANLkTilFrS3VQYLoJDRc9qTgpVg32XM6GCwbv8kAKSPI@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Tracking SQLs that update data  (Phoenix Kiula <phoenix.kiula@gmail.com>)
Список pgsql-general
On Sat, Jun 19, 2010 at 5:28 AM, Phoenix Kiula <phoenix.kiula@gmail.com> wrote:
>> It's far easier to adjust the logging.
>>
>> psql mydb
>> alter mydb set log_statement='mod';
>
>
>
> Thanks Scott.
>
> Two questions:
>
> 1. Will this log_statement='mod' be a permanent thing, or when I have
> done my testing and identifying the problem SQL, I can set it back to
> default so not too much logging is being done?

Just alter it back to 'none' when you're done.  Note you can also set
it per user, so if it's a certain user you want to log you can only
log their statements.

> 2. After this statement, how or where do I find the culprit SQL?

They should be in the postgresql logs.

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

Предыдущее
От: Teodor Macicas
Дата:
Сообщение: Re: Inserting additional data into pg_statistics
Следующее
От: David Goodenough
Дата:
Сообщение: A thought about other open source projects