From: | Costa Alexoglou <costa(at)dbtune(dot)com> |
---|---|
To: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Empty query_id in pg_stat_activity |
Date: | 2024-12-06 14:32:18 |
Message-ID: | CAJ+5Ff4sLuTMpg__fZH67UdaC2bWpLK1U3a8kkj_BvqO8ScYQw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Erik Wienhold | 2024-12-06 15:44:29 | Re: Empty query_id in pg_stat_activity |
Previous Message | Arbol One | 2024-12-06 12:53:44 | Re: GRANT WITH INHERIT ?? |