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)
>
>
On Thu, 17 Jun 2021 at 20:20, Julien Rouhaud wrote:
>
> On Thu, Jun 17, 2021 at 08:09:54PM +0530, Vijaykumar Jain wrote:
> > how is the compute_query_id actually calculated?
>
> > why does it show 0 in logs for random sql queries.
> > log_line_prefix = '%Q :'
> > 0 :LOG: statement: select * from
On Thu, Jun 17, 2021 at 08:09:54PM +0530, Vijaykumar Jain wrote:
> how is the compute_query_id actually calculated?
It's the exact same implementation that was extracted from pg_stat_statements.
You have some implementation details at
https://www.postgresql.org/docs/current/pgstatstatements.html.