pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yambu <hyambu@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Query duration and query text
Date: Mon, 30 Nov 2020 12:28:35 -0500
Message-ID: <1272450.1606757315@sss.pgh.pa.us> (raw)
In-Reply-To: <CALhHtcDxA9pCT=r6j3CoPPcFbGo65B1xF9xrwA2-wHQ_rBFwAg@mail.gmail.com>
References: <CALhHtcDxA9pCT=r6j3CoPPcFbGo65B1xF9xrwA2-wHQ_rBFwAg@mail.gmail.com>

Yambu <hyambu@gmail.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





view thread (3+ messages)  latest in thread

Message-ID: <1272450.1606757315@sss.pgh.pa.us>
Permalink:  ../1272450.1606757315@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1272450.1606757315@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hyambu@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Query duration and query text
  In-Reply-To: <1272450.1606757315@sss.pgh.pa.us>

* 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