diff options
author | Robert Haas <rhaas@postgresql.org> | 2012-04-18 11:17:30 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2012-04-18 11:17:30 -0400 |
commit | 53c5b869b464d567c3b8f617201b49a395f437ab (patch) | |
tree | 60377296105651401329bc604e06deb54a4e8216 /src/include/storage/lock.h | |
parent | ab77b2da8bf2cd1c8068f2f90e95c42d426aba3c (diff) | |
download | postgresql-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.h | 1 |
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); |