]> granicus.if.org Git - postgresql/commit
Don't try to set InvalidXid as page pruning hint
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 27 Nov 2013 20:47:16 +0000 (17:47 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 28 Nov 2013 14:54:25 +0000 (11:54 -0300)
commit4ed0640e5c356e0935c3a057de7361fc444c0056
treef426ea9262f6e078a3913cbd5cfef811f7f37f3c
parentfbface6f946242571f4acbfa9a74727c073748ba
Don't try to set InvalidXid as page pruning hint

If a transaction updates/deletes a tuple just before aborting, and a
concurrent transaction tries to prune the page concurrently, the pruner
may see HeapTupleSatisfiesVacuum return HEAPTUPLE_DELETE_IN_PROGRESS,
but a later call to HeapTupleGetUpdateXid() return InvalidXid.  This
would cause an assertion failure in development builds, but would be
otherwise Mostly Harmless.

Fix by checking whether the updater Xid is valid before trying to apply
it as page prune point.

Reported by Andres in 20131124000203.GA4403@alap2.anarazel.de
src/backend/access/heap/pruneheap.c