From a804a23e7af0e075b88e7b03bfd9b0f22d2657b2 Mon Sep 17 00:00:00 2001 From: Simon Riggs Date: Fri, 10 Dec 2010 06:59:33 +0000 Subject: 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 --- src/backend/access/heap/pruneheap.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/backend/access/heap/pruneheap.c') diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c index 3332e085b83..6d72bb27659 100644 --- a/src/backend/access/heap/pruneheap.c +++ b/src/backend/access/heap/pruneheap.c @@ -237,7 +237,6 @@ heap_page_prune(Relation relation, Buffer buffer, TransactionId OldestXmin, { XLogRecPtr recptr; - Assert(TransactionIdIsValid(prstate.latestRemovedXid)); recptr = log_heap_clean(relation, buffer, prstate.redirected, prstate.nredirected, prstate.nowdead, prstate.ndead, -- cgit v1.2.3