- Notifications
You must be signed in to change notification settings - Fork38
Description
What: any session what is trying to select from pg_wait_sampling_profile is being blocked by pg_wait_sampling collector
Example:
pid | usename | blocked_by | blocking_duration | blocked_query
-------+----------+------------+-------------------+-----------------------------------------------------
30120 | postgres | {8966} | 7.279804 | select * FROM pg_wait_sampling_profile ;
ps -ef|grep 8966
postgres 8966 4118 5 Jul14 ? 6-05:23:43 postgres: nanp2: pg_wait_sampling collector
List all locks what pid 8966 holds:
select d.datname , l.locktype, l."database", l.transactionid , l."mode", l.pid from pg_catalog.pg_locks l left join pg_catalog.pg_database d on d."oid" = l."database" where l."database" is not null and l."database" <>0and pid=8966;
datname | locktype | database | transactionid | mode | pid
---------+----------+------------+---------------+---------------+------
| userlock | 3398742279 | | ExclusiveLock | 8966
(1 row)
As you see, there's no database with oid=3398742279
Environment:
pg_wait_sampling version 1.1
Postgres12.3
CentOS 7
Please let me know what else I need to share with you to help confirm and fix (if it's a bug)
Thank you in advance.