Re: Query duration and query text

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yambu <hyambu(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Query duration and query text
Date: 2020-11-30 17:28:35
Message-ID: 1272450.1606757315@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Yambu <hyambu(at)gmail(dot)com> writes:
> May i know why the query and the duration are recorded as separate lines in
> postgres csv logs?

log_statement and log_duration are independent features.

> Is there a way I can make the query and the duration to be in the same line?

If you drop those and instead set log_min_duration_statement = 0 (or
some positive value) then the statement will be printed with the duration.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Yambu 2020-11-30 21:38:42 Re: Query duration and query text
Previous Message Yambu 2020-11-30 17:15:53 Query duration and query text