@@ -2814,6 +2814,21 @@ heap_delete(Relation relation, ItemPointer tid,
2814
2814
*/
2815
2815
old_key_tuple = ExtractReplicaIdentity (relation , & tp , true, & old_key_copied );
2816
2816
2817
+ /*
2818
+ * If this is the first possibly-multixact-able operation in the current
2819
+ * transaction, set my per-backend OldestMemberMXactId setting. We can be
2820
+ * certain that the transaction will never become a member of any older
2821
+ * MultiXactIds than that. (We have to do this even if we end up just
2822
+ * using our own TransactionId below, since some other backend could
2823
+ * incorporate our XID into a MultiXact immediately afterwards.)
2824
+ */
2825
+ MultiXactIdSetOldestMember ();
2826
+
2827
+ compute_new_xmax_infomask (HeapTupleHeaderGetRawXmax (tp .t_data ),
2828
+ tp .t_data -> t_infomask , tp .t_data -> t_infomask2 ,
2829
+ xid , LockTupleExclusive , true,
2830
+ & new_xmax , & new_infomask , & new_infomask2 );
2831
+
2817
2832
START_CRIT_SECTION ();
2818
2833
2819
2834
/*
@@ -2833,21 +2848,6 @@ heap_delete(Relation relation, ItemPointer tid,
2833
2848
vmbuffer );
2834
2849
}
2835
2850
2836
- /*
2837
- * If this is the first possibly-multixact-able operation in the current
2838
- * transaction, set my per-backend OldestMemberMXactId setting. We can be
2839
- * certain that the transaction will never become a member of any older
2840
- * MultiXactIds than that. (We have to do this even if we end up just
2841
- * using our own TransactionId below, since some other backend could
2842
- * incorporate our XID into a MultiXact immediately afterwards.)
2843
- */
2844
- MultiXactIdSetOldestMember ();
2845
-
2846
- compute_new_xmax_infomask (HeapTupleHeaderGetRawXmax (tp .t_data ),
2847
- tp .t_data -> t_infomask , tp .t_data -> t_infomask2 ,
2848
- xid , LockTupleExclusive , true,
2849
- & new_xmax , & new_infomask , & new_infomask2 );
2850
-
2851
2851
/* store transaction information of xact deleting the tuple */
2852
2852
tp .t_data -> t_infomask &= ~(HEAP_XMAX_BITS | HEAP_MOVED );
2853
2853
tp .t_data -> t_infomask2 &= ~HEAP_KEYS_UPDATED ;
0 commit comments