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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/53c5b869b464d567c3b8f617201b49a395f437ab
Modified Files
--------------
src/backend/access/transam/xact.c | 4 +-
src/backend/storage/lmgr/README | 2 +-
src/backend/storage/lmgr/lock.c | 91 ++++++++++++++++++++++++++++++-------
src/backend/storage/lmgr/proc.c | 19 +++++---
src/backend/tcop/postgres.c | 6 +-
src/include/storage/lock.h | 1 +
src/include/storage/proc.h | 2 +-
7 files changed, 94 insertions(+), 31 deletions(-)