From: Maciek Sakrejda <m.sakrejda@gmail.com>
To: Atul Kumar <akumar14871@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: log_statement vs log_min_duration_statement
Date: Tue, 26 Sep 2023 12:43:54 -0700
Message-ID: <CAOtHd0AnQPeQAdJ0WSv3D2evcsGCEd8WtyeUf+OKrn-AzDepBQ@mail.gmail.com> (raw)
In-Reply-To: <CA+ONtZ7dOdN4hdqcgrNeVAe1U2BDGyYDA53aG2FydbM5s1qJ1g@mail.gmail.com>
References: <CA+ONtZ7dOdN4hdqcgrNeVAe1U2BDGyYDA53aG2FydbM5s1qJ1g@mail.gmail.com>
On Tue, Sep 26, 2023, 12:34 Atul Kumar <akumar14871@gmail.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.
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: m.sakrejda@gmail.com, akumar14871@gmail.com
Subject: Re: log_statement vs log_min_duration_statement
In-Reply-To: <CAOtHd0AnQPeQAdJ0WSv3D2evcsGCEd8WtyeUf+OKrn-AzDepBQ@mail.gmail.com>
References: <CA+ONtZ7dOdN4hdqcgrNeVAe1U2BDGyYDA53aG2FydbM5s1qJ1g@mail.gmail.com> <CAOtHd0AnQPeQAdJ0WSv3D2evcsGCEd8WtyeUf+OKrn-AzDepBQ@mail.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