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

Hot Standby: Relation-specific deferred conflict resolution

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Hot Standby: Relation-specific deferred conflict resolution
Date: 2010-01-28 21:49:22
Message-ID: 1264715363.24669.12324.camel@ebony (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Conflict resolution improvements are important to include in this
release, as discussed many times. Proposal given here
presents a viable design to improve this.

Following patch is a complete working implementation of that design.
I'm still testing it, but its worth publishing as early as possible to
allow discussion. Not for commit, just yet, but soon.

standby.c changes are to decide whether to defer recovery based upon
relfilenode of WAL record. If resolution deferred, re-check for conflict
during LockAcquire() and fail with snapshot error, just as if resolution
had never been deferred. Also, an optimisation of conflict processing to
avoid continual re-evaluation of conflicts since some are now deferred.

API changes in heapam and nbtxlog to pass thru RelFileNode
API changes in indexcmds, no behaviour changes
procarray changes to implement LatestRemovedXid cache

 backend/access/heap/heapam.c    |    6 -
 backend/access/nbtree/nbtxlog.c |    2 
 backend/commands/indexcmds.c    |    4 -
 backend/storage/ipc/procarray.c |   55 +++++++++++-
 backend/storage/ipc/standby.c   |  112 +++++++++++++++++++++++------
 backend/storage/lmgr/lock.c     |  124 ++++++++++++++++++++++++++++++--
 include/storage/lock.h          |    8 ++
 include/storage/proc.h          |    5 +
 include/storage/standby.h       |    9 ++
 9 files changed, 292 insertions(+), 33 deletions(-)

 Simon Riggs 

Attachment: relation_specific_conflict_resolution.patch
Description: text/x-patch (26.4 KB)


pgsql-hackers by date

Next:From: Michael GlaesemannDate: 2010-01-28 22:14:04
Subject: Pathological regexp match
Previous:From: Mike RylanderDate: 2010-01-28 21:44:28
Subject: Re: remove contrib/xml2

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