Re: log_statement vs log_min_duration_statement

From: Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>
To: Atul Kumar <akumar14871(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: log_statement vs log_min_duration_statement
Date: 2023-09-26 19:43:54
Message-ID: CAOtHd0AnQPeQAdJ0WSv3D2evcsGCEd8WtyeUf+OKrn-AzDepBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Sep 26, 2023, 12:34 Atul Kumar <akumar14871(at)gmail(dot)com> wrote:

> What am I missing here to understand, because as per my understanding
> log_statement and log_min_duration_statement are correlated, postgres
> should log according to log_statement parameter.
>

The two settings are independent. One logs *all* statements in the
specified category, and the other *all* statements that execute longer than
the specified threshold. I don't believe there is a built-in way of getting
the behavior you're looking for.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2023-09-26 20:29:23 Re: Ad hoc SETOF type definition?
Previous Message Philip Carlsen 2023-09-26 19:39:31 valid casts to anyarray