Empty query_id in pg_stat_activity - Mailing list pgsql-general

From Costa Alexoglou
Subject Empty query_id in pg_stat_activity
Date
Msg-id CAJ+5Ff4sLuTMpg__fZH67UdaC2bWpLK1U3a8kkj_BvqO8ScYQw@mail.gmail.com
Whole thread Raw
Responses Re: Empty query_id in pg_stat_activity
List pgsql-general
Hey folks, I am running Benchbase and pgbench at the same time just for debugging purposes, and I notice that sometimes query_id is missing
from pg_stat_activity. Any clue why this is happening?

```
benchbase=# SELECT query_id, now() - query_start as duration, query FROM pg_stat_activity WHERE state = 'active' AND backend_type = 'client backend' ORDER BY duration DESC LIMIT 5; query_id | duration | query ---------------------+------------------+------------------------------------------------------------------------ | 00:00:00.223544 | SELECT + | | s_suppkey, + | | s_name, + | | s_address, + | | s_phone, + | | total_revenue + | | FROM + | | supplier, + | | revenue0 + | | WHERE + | | s_suppkey = supplier_no + | | AND total_revenue = ( + | | SELECT + | | MAX(total_revenue) + | | FROM + | | revenue0 + | | ) + | | ORDER BY + | | s_suppkey + | | 3080582906387216276 | 00:00:00.000032 | UPDATE pgbench_branches SET bbalance = bbalance + -4897 WHERE bid = 8; 3080582906387216276 | -00:00:00.000321 | UPDATE pgbench_branches SET bbalance = bbalance + -377 WHERE bid = 6; 2064869707185898531 | -00:00:00.000501 | END; 2064869707185898531 | -00:00:00.000502 | END; (5 rows)
```

Cheers,
Costa

pgsql-general by date:

Previous
From: Arbol One
Date:
Subject: Re: GRANT WITH INHERIT ??
Next
From: Erik Wienhold
Date:
Subject: Re: Empty query_id in pg_stat_activity