Re: Question about PostgreSQL logging configuration

Поиск
Список
Период
Сортировка
От Maxim Boguk
Тема Re: Question about PostgreSQL logging configuration
Дата
Msg-id CAK-MWwSDzQ4eDEPpbwqkBsr7ms+wZ355-0kdmVe7FzZQzrYLpg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Question about PostgreSQL logging configuration  ("Greg Sabino Mullane" <greg@turnstep.com>)
Ответы Re: Question about PostgreSQL logging configuration  ("Greg Sabino Mullane" <greg@turnstep.com>)
Список pgsql-general
>> I want log all 'mod' statements with their execution times and all
>> statements longer than 10ms (also with their execution times).
>
> You cannot combine things as you want. However, it seems a fairly
> minor loss - why would you care about how fast sub-10ms mods
> ran?

Trouble if I try that way, than database log for mod statements over
10ms duration will be written in wrong style:
2012-11-30 08:06:28 MSK [vxid:229/5138506 txid:1345713884] [INSERT]
LOG:  duration: 10.158 ms
2012-11-30 08:06:28 MSK [vxid:325/5420118 txid:0] [UPDATE] LOG:
execute S_5: update applicant_adv_subscription ...

instead of more usual way:
2012-11-30 08:08:21 MSK [vxid:307/5334684 txid:0] [SELECT] LOG:
duration: 16.085 ms  execute S_42: select ...

So at end I getting logs which are incompatible with pgFouine (and
with my custom log analyzer as well).

Is there any serious reason why log_duration = on uses so strange output style?

I could not think any reasonable case for use log_duration = on
without log_statements = all.

And log_duration = on with log_statements = all produce results which
are equivalent to log_min_duration_statement=0,
but log_min_duration_statement=0 produce logs which are much more easy
to parse and read in general.

Is there anyone who consciously used log_duration = on without
log_statements = all ?
And if yes - what for?

I might be very wrong, but log_duration seems close to useless knob in reality.

Kind Regards,
Maksym


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

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Question about PostgreSQL logging configuration
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Question about PostgreSQL logging configuration