Closed mble closed 2 years ago
Will this ever be merged ?
@stof I'll take a look at this again, but I can't provide a timeline on it being merged and released.
Is this change rejected, even though it had been approved ?
@stof Much of pg-extras
has made it into the main CLI (https://github.com/heroku/cli/blob/master/packages/pg-v5) so any further changes to this query will likely happen there.
There have also been additional lock events exposed by Postgres since this was further authored, so needs another look.
@mble I think the link you gave is the wrong one
@stof oops, corrected in the original post. Paste buffer management!
This commit expands the pg:locks query to better handle expanded lock types, and provide richer information about the locks.
The main downside is that by including more lock types, there is a lot more information. For example, obtaining an
AccessExclusiveLock
on a table (as part ofDROP TABLE
), grabs locks on sequences, TOAST data and indexes as well as the table itself, as well as locks onpg_type
and other system tables, that aren't easily understood.This is best highlighted with the updated example in the README.
In order to help account for this, new columns have been added to help identify the lock types as well as lock modes, and provide some further information. This might be too much, so feedback is deeply appreciated.
AccessExclusiveLock
andRowExclusiveLock
Fixes #149