hi,

I noticed this new param compute_query_id in pg14beta.
it is interesting as I was long wanting to identify a query with a unique
id like we have for http requests etc so that we can trace the query all
the way to shards via FDW etc.

but i cannot see them in the logs even after setting compute_query_id on.
i also read
compute_query_id_query
<https://www.postgresql.org/message-id/yhpku8hfi4no4...@paquier.xyz>  for
the same.
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 pg_stat_activity;

i mean pid already was doing the job to identify the query and its children
even it logs,
but i know pid will get recycled.
queryjumble.c
<https://github.com/postgres/postgres/blob/cafde58b337e007cb6a719f5ab4dd6459d932a39/src/backend/utils/misc/queryjumble.c>

tldr;
how is compute_query_id different from pid to identify some query running ?
can it be passed on to FDW queries ? for tracing etc ?

am i totally getting its use case totally wrong :)


-- 
Thanks,
Vijay
Mumbai, India

Reply via email to