pgsql: Resolve timing issue with logging locks for Hot Standby. - Mailing list pgsql-committers

From Simon Riggs
Subject pgsql: Resolve timing issue with logging locks for Hot Standby.
Date
Msg-id E1RsWXM-0000LN-1K@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Resolve timing issue with logging locks for Hot Standby.
We log AccessExclusiveLocks for replay onto standby nodes,
but because of timing issues on ProcArray it is possible to
log a lock that is still held by a just committed transaction
that is very soon to be removed. To avoid any timing issue we
avoid applying locks made by transactions with InvalidXid.

Simon Riggs, bug report Tom Lane, diagnosis Pavan Deolasee

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/8572cc495cd07d4f4a59624d275a75b45340a3b2

Modified Files
--------------
src/backend/storage/ipc/procarray.c |    8 +--
src/backend/storage/ipc/standby.c   |  110 ++++++++++++++++++++++++-----------
src/backend/storage/lmgr/lock.c     |   12 ++++-
src/include/storage/standby.h       |    2 +-
4 files changed, 88 insertions(+), 44 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Code review for plpgsql fn_signature patch.
Next
From: Simon Riggs
Date:
Subject: pgsql: Resolve timing issue with logging locks for Hot Standby.