]> granicus.if.org Git - postgresql/commit
Tighten up error recovery for fast-path locking.
authorRobert Haas <rhaas@postgresql.org>
Wed, 18 Apr 2012 15:17:30 +0000 (11:17 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 18 Apr 2012 15:17:30 +0000 (11:17 -0400)
commit53c5b869b464d567c3b8f617201b49a395f437ab
tree60377296105651401329bc604e06deb54a4e8216
parentab77b2da8bf2cd1c8068f2f90e95c42d426aba3c
Tighten up error recovery for fast-path locking.

The previous code could cause a backend crash after BEGIN; SAVEPOINT a;
LOCK TABLE foo (interrupted by ^C or statement timeout); ROLLBACK TO
SAVEPOINT a; LOCK TABLE foo, and might have leaked strong-lock counts
in other situations.

Report by Zoltán Böszörményi; patch review by Jeff Davis.
src/backend/access/transam/xact.c
src/backend/storage/lmgr/README
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/proc.c
src/backend/tcop/postgres.c
src/include/storage/lock.h
src/include/storage/proc.h