Re: Logging

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Logging
Дата
Msg-id 6b3a4185-611e-5576-d5f8-ec036f67ba86@aklaver.com
обсуждение исходный текст
Ответ на Re: Logging  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Logging
Список pgsql-general
On 06/12/2018 08:25 PM, David G. Johnston wrote:
> On Tuesday, June 12, 2018, Andrew Bartley <ambartley@gmail.com 
> <mailto:ambartley@gmail.com>> wrote:
> 
> 
> 
>     On Wed, 13 Jun 2018 at 12:43 Laurenz Albe <laurenz.albe@cybertec.at
>     <mailto:laurenz.albe@cybertec.at>> wrote:
> 
> 
>         log_min_duration_statement = 0
> 
> [...]
> 
> 
>     log_min_duration_statement -1
> 
> 
> You've disabled statement logging altogether.  The zero value you were 
> directed to use is what causes everything to be logged.

Actually no:

https://www.postgresql.org/docs/10/static/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHEN

log_min_duration_statement (integer)

"... Setting this to zero prints all statement durations. Minus-one (the 
default) disables logging statement durations.  ..."

"

So -1 only affects logging statements relative to duration.

If you have log_statements set then you will still get statements logged 
if you have log_min_duration_statement = -1 :

Note

When using this option together with log_statement, the text of 
statements that are logged because of log_statement will not be repeated 
in the duration log message.
"

This is how I have my logging setup, log_min_duration_statement = -1
and log_statements = 'mod' and I see statements in the logs.

> 
> David J.
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


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

Предыдущее
От: Andrew Bartley
Дата:
Сообщение: Re: Logging
Следующее
От: Andrew Bartley
Дата:
Сообщение: Re: Logging