aboutsummaryrefslogtreecommitdiff
path: root/src/include/storage/lock.h
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2012-04-18 11:17:30 -0400
committerRobert Haas <rhaas@postgresql.org>2012-04-18 11:17:30 -0400
commit53c5b869b464d567c3b8f617201b49a395f437ab (patch)
tree60377296105651401329bc604e06deb54a4e8216 /src/include/storage/lock.h
parentab77b2da8bf2cd1c8068f2f90e95c42d426aba3c (diff)
downloadpostgresql-53c5b869b464d567c3b8f617201b49a395f437ab.tar.gz
postgresql-53c5b869b464d567c3b8f617201b49a395f437ab.zip
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.
Diffstat (limited to 'src/include/storage/lock.h')
-rw-r--r--src/include/storage/lock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h
index 6e7a6e9b689..92b6d9d1b42 100644
--- a/src/include/storage/lock.h
+++ b/src/include/storage/lock.h
@@ -489,6 +489,7 @@ extern LockAcquireResult LockAcquireExtended(const LOCKTAG *locktag,
bool sessionLock,
bool dontWait,
bool report_memory_error);
+extern void AbortStrongLockAcquire(void);
extern bool LockRelease(const LOCKTAG *locktag,
LOCKMODE lockmode, bool sessionLock);
extern void LockReleaseSession(LOCKMETHODID lockmethodid);