]> granicus.if.org Git - postgresql/commit
Reduce spurious Hot Standby conflicts from never-visible records.
authorSimon Riggs <simon@2ndQuadrant.com>
Thu, 9 Dec 2010 09:41:47 +0000 (09:41 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Thu, 9 Dec 2010 09:41:47 +0000 (09:41 +0000)
commitb9075a6d2f9b07a00262a670dd60272904c79dce
treeb514ca79db8457ffe6013ee512e2f0598713f1a3
parent576477e73c4a9cb32c7471c1cec354fd5328140e
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.
src/backend/access/heap/heapam.c
src/backend/access/heap/pruneheap.c
src/backend/access/nbtree/nbtxlog.c