log_statement vs log_min_duration_statement

From: Atul Kumar <akumar14871(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: log_statement vs log_min_duration_statement
Date: 2023-09-26 18:31:22
Message-ID: CA+ONtZ7dOdN4hdqcgrNeVAe1U2BDGyYDA53aG2FydbM5s1qJ1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a query about parameters and log_statement

my postgres version is 12 and running on centos 7

my log_statement is set to "DDL".

and log_min_duration_statement is set to "1ms"

so technically it should log "ONLY DDLs" that take more than 1ms.

but to my surprise, postgres is logging DML as well which is taking more
than 1ms.

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.

Please advise me on this behavior.

Regards,
Atul

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2023-09-26 18:39:17 Re: log_statement vs log_min_duration_statement
Previous Message Tom Lane 2023-09-26 18:15:03 Re: Ad hoc SETOF type definition?