From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Vijaykumar Jain <vijaykumarjain(dot)github(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: compute_query_id |
Date: | 2021-06-17 15:34:41 |
Message-ID: | 20210617153441.klssqpnou77zu5bd@nol |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Alexey Bashtanov | 2021-06-17 15:48:16 | Re: Streaming replication: PANIC on tertiary when secondary promoted |
Previous Message | Vijaykumar Jain | 2021-06-17 15:27:02 | Re: compute_query_id |