Search Postgresql Archives

Re: compute_query_id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux