@@ -2717,6 +2717,21 @@ heap_delete(Relation relation, ItemPointer tid,
27172717/* replace cid with a combo cid if necessary */
27182718HeapTupleHeaderAdjustCmax (tp .t_data ,& cid ,& iscombo );
27192719
2720+ /*
2721+ * If this is the first possibly-multixact-able operation in the current
2722+ * transaction, set my per-backend OldestMemberMXactId setting. We can be
2723+ * certain that the transaction will never become a member of any older
2724+ * MultiXactIds than that.(We have to do this even if we end up just
2725+ * using our own TransactionId below, since some other backend could
2726+ * incorporate our XID into a MultiXact immediately afterwards.)
2727+ */
2728+ MultiXactIdSetOldestMember ();
2729+
2730+ compute_new_xmax_infomask (HeapTupleHeaderGetRawXmax (tp .t_data ),
2731+ tp .t_data -> t_infomask ,tp .t_data -> t_infomask2 ,
2732+ xid ,LockTupleExclusive , true,
2733+ & new_xmax ,& new_infomask ,& new_infomask2 );
2734+
27202735START_CRIT_SECTION ();
27212736
27222737/*
@@ -2736,21 +2751,6 @@ heap_delete(Relation relation, ItemPointer tid,
27362751vmbuffer );
27372752}
27382753
2739- /*
2740- * If this is the first possibly-multixact-able operation in the current
2741- * transaction, set my per-backend OldestMemberMXactId setting. We can be
2742- * certain that the transaction will never become a member of any older
2743- * MultiXactIds than that.(We have to do this even if we end up just
2744- * using our own TransactionId below, since some other backend could
2745- * incorporate our XID into a MultiXact immediately afterwards.)
2746- */
2747- MultiXactIdSetOldestMember ();
2748-
2749- compute_new_xmax_infomask (HeapTupleHeaderGetRawXmax (tp .t_data ),
2750- tp .t_data -> t_infomask ,tp .t_data -> t_infomask2 ,
2751- xid ,LockTupleExclusive , true,
2752- & new_xmax ,& new_infomask ,& new_infomask2 );
2753-
27542754/* store transaction information of xact deleting the tuple */
27552755tp .t_data -> t_infomask &= ~(HEAP_XMAX_BITS |HEAP_MOVED );
27562756tp .t_data -> t_infomask2 &= ~HEAP_KEYS_UPDATED ;