From: Julien Rouhaud <rjuju123@gmail.com>
To: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: compute_query_id
Date: Thu, 17 Jun 2021 23:34:41 +0800
Message-ID: <20210617153441.klssqpnou77zu5bd@nol> (raw)
In-Reply-To: <CAM+6J95_c-7m=23+b7hLF_0GLj0N2go2i9GszQxL-nSj0rUsUQ@mail.gmail.com>
References: <CAM+6J945dckHgp7f_nvuOpcOxJLoXsKRtPH6zhFFJZ8f7Ox_ag@mail.gmail.com>
<20210617145026.ypll3a5iryjbks2h@nol>
<CAM+6J95_c-7m=23+b7hLF_0GLj0N2go2i9GszQxL-nSj0rUsUQ@mail.gmail.com>
On Thu, Jun 17, 2021 at 08:57:02PM +0530, Vijaykumar Jain wrote:
>
> test=# show log_line_prefix;
> log_line_prefix
> --------------------------------
> [timestamp=%t] [query_id=%Q] :
> (1 row)
>
> test=# show compute_query_id;
> compute_query_id
> ------------------
> on
> (1 row)
>
> test=# show log_statement;
> log_statement
> ---------------
> all
> (1 row)
>
> ************************************* corrects myself
> ..... ok now it works, when i set log_min_duration_statement =0 to log
> all statements.
>
> test=# show log_min_duration_statement;
> log_min_duration_statement
> ----------------------------
> 0
> (1 row)
Yes, unfortunately log_statements is not compatible with compute_query_id.
This is documented at
https://www.postgresql.org/docs/devel/runtime-config-logging.html#GUC-LOG-LINE-PREFIX:
> The %Q escape always reports a zero identifier for lines output by
> log_statement because log_statement generates output before an identifier can
> be calculated, including invalid statements for which an identifier cannot be
> calculated.
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: rjuju123@gmail.com, vijaykumarjain.github@gmail.com
Subject: Re: compute_query_id
In-Reply-To: <20210617153441.klssqpnou77zu5bd@nol>
References: <CAM+6J945dckHgp7f_nvuOpcOxJLoXsKRtPH6zhFFJZ8f7Ox_ag@mail.gmail.com> <20210617145026.ypll3a5iryjbks2h@nol> <CAM+6J95_c-7m=23+b7hLF_0GLj0N2go2i9GszQxL-nSj0rUsUQ@mail.gmail.com> <20210617153441.klssqpnou77zu5bd@nol>
* 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