Re: Use case for enabling log_duration other than benchmarking - Mailing list pgsql-general

From Ron
Subject Re: Use case for enabling log_duration other than benchmarking
Date
Msg-id ea71e4b5-bb1c-00ea-4376-b87e3327de58@gmail.com
Whole thread Raw
In response to Use case for enabling log_duration other than benchmarking  (Alicja Kucharczyk <zaledwie10minut@gmail.com>)
Responses Re: Use case for enabling log_duration other than benchmarking
List pgsql-general
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 setting log_min_duration_statement to 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.

pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: pg_multixact_member file limits
Next
From: Vikas Sharma
Date:
Subject: Best opensource Postgresql monitoring tool