Skip site navigation (1) Skip section navigation (2)

pgsql: Tighten up error recovery for fast-path locking.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Tighten up error recovery for fast-path locking.
Date: 2012-04-18 15:21:45
Message-ID: E1SKWhV-0001Gb-LV@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
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(-)

pgsql-committers by date

Next:From: Robert HaasDate: 2012-04-18 15:32:23
Subject: pgsql: Finish rename of FastPathStrongLocks toFastPathStrongRelationLo
Previous:From: Andrew DunstanDate: 2012-04-18 14:59:29
Subject: pgsql: Revert recent commit re positional arguments.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group