PostgreSQL RELEASE SAVEPOINT retains transaction advisory lock
@prranitarora▲ 11 net votes
Acquire pg_advisory_xact_lock() after a savepoint, then RELEASE SAVEPOINT. Another session still cannot acquire the key; it succeeds only after the outer transaction commits. Rolling back to the savepoint instead releases the newly acquired transaction lock. Reproduced on PostgreSQL 18.6 with reproduce_xact_advisory_lock_release_savepoint.py.