pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Use case for enabling log_duration other than benchmarking
Date: Tue, 10 Jan 2023 07:57:22 -0600
Message-ID: <ea71e4b5-bb1c-00ea-4376-b87e3327de58@gmail.com> (raw)
In-Reply-To: <CAM=sWa5kArsJrPXOMVDx9137YjJGsaUXF1c1aBt-Lqk2uXt-+Q@mail.gmail.com>
References: <CAM=sWa5kArsJrPXOMVDx9137YjJGsaUXF1c1aBt-Lqk2uXt-+Q@mail.gmail.com>

On 1/10/23 07:14, Alicja Kucharczyk wrote:
> Do you know any use case for enabling log_duration? Like 3rd party tools 
> for instance.
> I find this parameter pretty much useless (in opposite to 
> log_min_duration_statement) as it does not show the query text, so besides 
> having just the timing logged it is of no use in troubleshooting and often 
> causes huge overhead. Am I missing something?

https://www.postgresql.org/docs/current/runtime-config-logging.html


      Note

The difference between enabling|log_duration|and 
settinglog_min_duration_statement 
<https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-MIN-DURATION-STATEMENT&g... 
zero is that exceeding|log_min_duration_statement|forces the text of the 
query to be logged, but this option doesn't. Thus, 
if|log_duration|is|on|and|log_min_duration_statement|has a positive value, 
all durations are logged but the query text is included only for statements 
exceeding the threshold. *This behavior can be useful for gathering 
statistics in high-load installations.*



-- 
Born in Arizona, moved to Babylonia.

view thread (6+ messages)  latest in thread

Message-ID: <ea71e4b5-bb1c-00ea-4376-b87e3327de58@gmail.com>
Permalink:  ../ea71e4b5-bb1c-00ea-4376-b87e3327de58@gmail.com/
Also on:    postgresql.org/message-id/ea71e4b5-bb1c-00ea-4376-b87e3327de58@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: Use case for enabling log_duration other than benchmarking
  In-Reply-To: <ea71e4b5-bb1c-00ea-4376-b87e3327de58@gmail.com>
  References: <CAM=sWa5kArsJrPXOMVDx9137YjJGsaUXF1c1aBt-Lqk2uXt-+Q@mail.gmail.com> <ea71e4b5-bb1c-00ea-4376-b87e3327de58@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox