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

pgsql: Reduce spurious Hot Standby conflicts from never-visiblerecords

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Reduce spurious Hot Standby conflicts from never-visiblerecords
Date: 2010-12-09 09:45:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Reduce spurious Hot Standby conflicts from never-visible records.
Hot Standby conflicts only with tuples that were visible at
some point. So ignore tuples from aborted transactions or for
tuples updated/deleted during the inserting transaction when
generating the conflict transaction ids.

Following detailed analysis and test case by Noah Misch.
Original report covered btree delete records, correctly observed
by Heikki Linnakangas that this applies to other cases also.
Fix covers all sources of cleanup records via common code.



Modified Files
src/backend/access/heap/heapam.c    |   33 +++++++++++++++++++++++++--------
src/backend/access/heap/pruneheap.c |    1 -
src/backend/access/nbtree/nbtxlog.c |   19 +++++--------------
3 files changed, 30 insertions(+), 23 deletions(-)

pgsql-committers by date

Next:From: Simon RiggsDate: 2010-12-09 10:22:35
Subject: pgsql: Self review of previous patch. Fix assumption that xmax >=xmin.
Previous:From: Tom LaneDate: 2010-12-09 01:02:29
Subject: pgsql: Force default wal_sync_method to be fdatasync on Linux.

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