Re: Question about PostgreSQL logging configuration - Mailing list pgsql-general

From Maxim Boguk
Subject Re: Question about PostgreSQL logging configuration
Date
Msg-id CAK-MWwSDzQ4eDEPpbwqkBsr7ms+wZ355-0kdmVe7FzZQzrYLpg@mail.gmail.com
Whole thread Raw
In response to Re: Question about PostgreSQL logging configuration  ("Greg Sabino Mullane" <greg@turnstep.com>)
Responses Re: Question about PostgreSQL logging configuration  ("Greg Sabino Mullane" <greg@turnstep.com>)
List 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 by date:

Previous
From: "Greg Sabino Mullane"
Date:
Subject: Re: Question about PostgreSQL logging configuration
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: Question about PostgreSQL logging configuration