Re: log_min_duration question

From: Joshua Berkus <josh(at)agliodbs(dot)com>
To: Harald Fuchs <hari(dot)fuchs(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: log_min_duration question
Date: 2016-02-08 09:13:42
Message-ID: 601665347.2907.1454922822904.JavaMail.zimbra@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

----- Original Message -----
> From the 9.5 docs:
>
> log_min_duration_statement (integer)
>
> Causes the duration of each completed statement to be logged if the
> statement ran for at least the specified number of
> milliseconds. Setting this to zero prints all statement
> durations. Minus-one (the default) disables logging statement
> durations. For example, if you set it to 250ms then all SQL statements
> that run 250ms or longer will be logged.
>
> While the first sentence explicitly states a fixed unit (namely msec),
> the last sentence seems to imply a (maybe optional) unit suffix
> (ms in this case). Which one is true?
>
> How would e.g. "SET log_min_duration_statement=1min" be interpreted?

As one minute.

>
> I'd prefer a docs clarification.

# log all statements which take more than 100ms
log_min_duration_statement = 100

# log all statements which take more than 30 seconds
log_min_duration_statement = 30s

All of the GUCS which take time have both a base unit (ms, s) or they accept a time abbreviation (ms, s, min, h).

--
Josh Berkus
Red Hat OSAS
(opinions are my own)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gavin Flower 2016-02-08 09:50:08 Re: Let's Do the CoC Right
Previous Message Harald Fuchs 2016-02-08 08:25:56 log_min_duration question