mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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.
This commit is contained in:
@ -2259,7 +2259,7 @@ AbortTransaction(void)
|
||||
* Also clean up any open wait for lock, since the lock manager will choke
|
||||
* if we try to wait for another lock before doing this.
|
||||
*/
|
||||
LockWaitCancel();
|
||||
LockErrorCleanup();
|
||||
|
||||
/*
|
||||
* check the current transaction state
|
||||
@ -4144,7 +4144,7 @@ AbortSubTransaction(void)
|
||||
AbortBufferIO();
|
||||
UnlockBuffers();
|
||||
|
||||
LockWaitCancel();
|
||||
LockErrorCleanup();
|
||||
|
||||
/*
|
||||
* check the current transaction state
|
||||
|
Reference in New Issue
Block a user