Fix lock release for role membership grants in DROP OWNED BY.

Commit 6566133c5f5 added a case for AuthMemRelationId in
AcquireDeletionLock(), but not ReleaseDeletionLock(). The fall-through
case would go to UnlockDatabaseObject(), which would raise a WARNING;
and the lock would be retained until the end of the transaction.

Add the missing branch.

Discussion: 
https://postgr.es/m/[email protected]
Backpatch-through: 16

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e61d44fdee7e299dcbd4e168bda1e6670680aebc

Modified Files
--------------
src/backend/catalog/dependency.c                 |  3 +++
src/test/isolation/expected/drop-owned-grant.out |  8 +++++++
src/test/isolation/isolation_schedule            |  1 +
src/test/isolation/specs/drop-owned-grant.spec   | 30 ++++++++++++++++++++++++
4 files changed, 42 insertions(+)

Reply via email to