@@ -2814,6 +2814,21 @@ heap_delete(Relation relation, ItemPointer tid,
28142814 */
28152815old_key_tuple = ExtractReplicaIdentity (relation ,& tp , true,& old_key_copied );
28162816
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+
28172832START_CRIT_SECTION ();
28182833
28192834/*
@@ -2833,21 +2848,6 @@ heap_delete(Relation relation, ItemPointer tid,
28332848vmbuffer );
28342849}
28352850
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-
28512851/* store transaction information of xact deleting the tuple */
28522852tp .t_data -> t_infomask &= ~(HEAP_XMAX_BITS |HEAP_MOVED );
28532853tp .t_data -> t_infomask2 &= ~HEAP_KEYS_UPDATED ;