> On 11/05/2023 11:11 CEST kaido vaikla <kaido.vaikla@xxxxxxxxx> wrote: > > Question, when or why query_id in pg_stat_activity is not present > > > postgres=# select version(); > version > --------------------------------------------------------------------------------------------------------- > PostgreSQL 15.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit > (1 row) > > postgres=# select user; > user > ---------- > postgres > (1 row) > > postgres=# show compute_query_id; > compute_query_id > ------------------ > on > (1 row) > > postgres=# select application_name, query_id from pg_stat_activity order by 1; > application_name | query_id > ------------------------+--------------------- > | > | > | > | > | > barman_receive_wal | > IntelliJ IDEA 2023.1.1 | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > PostgreSQL JDBC Driver | > psql | 3408001232671049700 > (61 rows) The reason could be any of the following: * no query executed yet * compute_query_id=off * compute_query_id=auto and pg_stat_statements (or any other module that calculates query_id) is not loaded -- Erik