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-10 07:00:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committerspgsql-hackers
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.
Includes additional fix compared to commit on HEAD



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


pgsql-hackers by date

Next:From: Dmitriy IgrishinDate: 2010-12-10 07:53:33
Subject: Fwd: Extended query protocol and exact types matches.
Previous:From: aaliya zarrinDate: 2010-12-10 06:51:23
Subject: Re: To Signal The postmaster

pgsql-committers by date

Next:From: Tom LaneDate: 2010-12-10 16:36:40
Subject: pgsql: Fix efficiency problems in tuplestore_trim().
Previous:From: Tom LaneDate: 2010-12-09 18:04:55
Subject: pgsql: Eliminate O(N^2) behavior in parallel restore with many blobs.

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