Skip to content

Instantly share code, notes, and snippets.

@stultus
Created December 18, 2019 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stultus/fd14681647c940e204cba681b7ea2ee8 to your computer and use it in GitHub Desktop.
Save stultus/fd14681647c940e204cba681b7ea2ee8 to your computer and use it in GitHub Desktop.
See postgress locks
SELECT t.relname, l.locktype, page, virtualtransaction, pid, mode, granted
FROM pg_locks l, pg_stat_all_tables t
WHERE l.relation = t.relid ORDER BY relation asc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment