process 75324 still waiting for AccessExclusiveLock on relation 28371 of database 5
I'm running into a locking issue again and could use some help. I tried to remove a column from a table using DBeaver, and the query just kept so I eventually canceled it. Then I checked the logs and saw the error in the title (plus the image).
This isn’t the first time I’ve hit this. It also happened when I tried to add RLS policies a while back. Previously, restarting the project fixed it, so I didn't dig into it much, but now it’s happening again and I’m not sure what’s causing it.
It’s just me on the DB as far as I know, so I’m kinda lost on what’s holding that lock. Any idea what might be going on?

1 Reply
You can see what that other query is from the
pg_stat_activity
table looking for the process ID. You can inspect the pg_locks
table to see what locks are held on relation 28371. You can inspect pg_class
to see what table has oid=28371
. Maybe those will give you some clues.