Reported-by: Tom Lane
Discussion: https://postgr.es/m/31072.
1585690490@sss.pgh.pa.us
Backpatch-through: 9.5 - 12
Once acquired, a lock is normally held until the end of the transaction. But if a
lock is acquired after establishing a savepoint, the lock is released
- immediately if the savepoint is rolled back. This is consistent with
+ immediately if the savepoint is rolled back to. This is consistent with
the principle that ROLLBACK cancels all effects of the
commands since the savepoint. The same holds for locks acquired within a
PL/pgSQL exception block: an error escape from the block