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

pgsql: Resolve timing issue with logging locks for Hot Standby.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Resolve timing issue with logging locks for Hot Standby.
Date: 2012-01-23 23:39:12
Message-ID: E1RpTTk-0006jo-PR@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: 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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/c172b7b02e6f6008d6dad66ddee8f67faf223c5b

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(-)

Responses

pgsql-committers by date

Next:From: Bruce MomjianDate: 2012-01-24 02:08:59
Subject: pgsql: Remove tab in 9.1 SGML file.
Previous:From: Simon RiggsDate: 2012-01-23 23:25:38
Subject: pgsql: ALTER <thing> [IF EXISTS] ... allows silent DDL if required,

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