pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Query_id is not being populated for all the pids
2+ messages / 2 participants
[nested] [flat]

* Query_id is not being populated for all the pids
@ 2024-05-20 19:48  Teja Jakkidi <teja.jakkidi05@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Teja Jakkidi @ 2024-05-20 19:48 UTC (permalink / raw)
  To: pgsql-admin <pgsql-admin@lists.postgresql.org>

Hello Admins,

When we query pg_stat_statements in Postgres, it has a column “query_id” which is not having any value for most of the sessions. 

Compute_query_id is set to AUTO

Can someone please help me understand why the query_id is missing most of the sessions and how is it populated in the background?

Thank you,
J. Teja.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Query_id is not being populated for all the pids
@ 2024-05-20 21:17  Erik Wienhold <ewie@ewie.name>
  parent: Teja Jakkidi <teja.jakkidi05@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Erik Wienhold @ 2024-05-20 21:17 UTC (permalink / raw)
  To: Teja Jakkidi <teja.jakkidi05@gmail.com>; +Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>

On 2024-05-20 21:48 +0200, Teja Jakkidi wrote:
> When we query pg_stat_statements in Postgres, it has a column
> “query_id” which is not having any value for most of the sessions. 
> 
> Compute_query_id is set to AUTO
> 
> Can someone please help me understand why the query_id is missing most
> of the sessions and how is it populated in the background?

Are you using PgJDBC or the extended query protocol?

This reminds me of this thread:
https://www.postgresql.org/message-id/flat/CA%2B427g8qBArPuqwZOuYVhdoCQUsdbutR18fG7Gt7%2B3JunuHsjA%4...

That was about pg_stat_activity, though.  But the key take-away was that
query_id is not computed in the extended query protocol which is used by
PgJDBC.

-- 
Erik





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-05-20 21:17 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-05-20 19:48 Query_id is not being populated for all the pids Teja Jakkidi <teja.jakkidi05@gmail.com>
2024-05-20 21:17 ` Erik Wienhold <ewie@ewie.name>

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