Alvaro Herrera escribió:
> Alvaro Herrera escribió:
>
> > Hm, if the foreign key patch is to blame, this sounds like these tuples
> > had a different set of XMAX hint bits and a different Xmax, and they
> > were clobbered by something like vacuum or page pruning.
>
> Hm, I think heap_freeze_tuple is busted, yes.
This patch seems to fix the problem for me. Please confirm.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
*** a/src/backend/access/heap/heapam.c
--- b/src/backend/access/heap/heapam.c
***************
*** 5113,5122 **** heap_freeze_tuple(HeapTupleHeader tuple, TransactionId cutoff_xid,
* cutoff; it doesn't remove dead members of a very old multixact.
*/
xid = HeapTupleHeaderGetRawXmax(tuple);
! if (TransactionIdIsNormal(xid) &&
! (((!(tuple->t_infomask & HEAP_XMAX_IS_MULTI) &&
! TransactionIdPrecedes(xid, cutoff_xid))) ||
! MultiXactIdPrecedes(xid, cutoff_multi)))
{
HeapTupleHeaderSetXmax(tuple, InvalidTransactionId);
--- 5113,5124 ----
* cutoff; it doesn't remove dead members of a very old multixact.
*/
xid = HeapTupleHeaderGetRawXmax(tuple);
! if (((tuple->t_infomask & HEAP_XMAX_IS_MULTI) &&
! MultiXactIdIsValid(xid) &&
! MultiXactIdPrecedes(xid, cutoff_multi)) ||
! ((!(tuple->t_infomask & HEAP_XMAX_IS_MULTI)) &&
! TransactionIdIsNormal(xid) &&
! TransactionIdPrecedes(xid, cutoff_xid)))
{
HeapTupleHeaderSetXmax(tuple, InvalidTransactionId);
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers