OSDN Git Service

Reduce spurious Hot Standby conflicts from never-visible records.
authorSimon Riggs <simon@2ndQuadrant.com>
Fri, 10 Dec 2010 06:59:33 +0000 (06:59 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Fri, 10 Dec 2010 06:59:33 +0000 (06:59 +0000)
commita804a23e7af0e075b88e7b03bfd9b0f22d2657b2
tree28751576fe1838881a15885703ab649cddaed171
parent2ffcb0cb6a5bf97de22f0ce58f55537ce1c87653
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/heapam.c
src/backend/access/heap/pruneheap.c
src/backend/access/nbtree/nbtxlog.c