@@ -954,12 +954,7 @@ xmin_cmp(const pairingheap_node *a, const pairingheap_node *b, void *arg)
954
954
*
955
955
* If there are no more snapshots, we can reset our PGXACT->xmin to InvalidXid.
956
956
* Note we can do this without locking because we assume that storing an Xid
957
- * is atomic. We do this because it will allow multi-statement transactions to
958
- * reset their xmin and prevent us from holding back removal of dead rows;
959
- * this has little purpose when we are dealing with very fast statements in
960
- * read committed mode since the xmin will advance quickly anyway. It has no
961
- * use at all when we are running single statement transactions since the xmin
962
- * is reset as part of end of transaction anyway.
957
+ * is atomic.
963
958
*
964
959
* Even if there are some remaining snapshots, we may be able to advance our
965
960
* PGXACT->xmin to some degree. This typically happens when a portal is
@@ -1056,7 +1051,7 @@ AtSubAbort_Snapshot(int level)
1056
1051
* Snapshot manager's cleanup function for end of transaction
1057
1052
*/
1058
1053
void
1059
- AtEOXact_Snapshot (bool isCommit , bool isPrepare )
1054
+ AtEOXact_Snapshot (bool isCommit )
1060
1055
{
1061
1056
/*
1062
1057
* In transaction-snapshot mode we must release our privately-managed
@@ -1141,17 +1136,7 @@ AtEOXact_Snapshot(bool isCommit, bool isPrepare)
1141
1136
1142
1137
FirstSnapshotSet = false;
1143
1138
1144
- /*
1145
- * During normal commit and abort processing, we call
1146
- * ProcArrayEndTransaction() or ProcArrayClearTransaction() to
1147
- * reset the PgXact->xmin. That call happens prior to the call to
1148
- * AtEOXact_Snapshot(), so we need not touch xmin here at all,
1149
- * accept when we are preparing a transaction.
1150
- */
1151
- if (isPrepare )
1152
- SnapshotResetXmin ();
1153
-
1154
- Assert (MyPgXact -> xmin == 0 );
1139
+ SnapshotResetXmin ();
1155
1140
}
1156
1141
1157
1142
0 commit comments