@@ -2717,6 +2717,21 @@ heap_delete(Relation relation, ItemPointer tid,
2717
2717
/* replace cid with a combo cid if necessary */
2718
2718
HeapTupleHeaderAdjustCmax (tp .t_data ,& cid ,& iscombo );
2719
2719
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
+
2720
2735
START_CRIT_SECTION ();
2721
2736
2722
2737
/*
@@ -2736,21 +2751,6 @@ heap_delete(Relation relation, ItemPointer tid,
2736
2751
vmbuffer );
2737
2752
}
2738
2753
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
-
2754
2754
/* store transaction information of xact deleting the tuple */
2755
2755
tp .t_data -> t_infomask &= ~(HEAP_XMAX_BITS |HEAP_MOVED );
2756
2756
tp .t_data -> t_infomask2 &= ~HEAP_KEYS_UPDATED ;