File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -2076,6 +2076,14 @@ SerializeSnapshot(Snapshot snapshot, char *start_address)
20762076 serialized_snapshot .whenTaken = snapshot -> whenTaken ;
20772077 serialized_snapshot .lsn = snapshot -> lsn ;
20782078
2079+ /*
2080+ * Ignore the SubXID array if it has overflowed, unless the snapshot was
2081+ * taken during recovey - in that case, top-level XIDs are in subxip as
2082+ * well, and we mustn't lose them.
2083+ */
2084+ if (serialized_snapshot .suboverflowed && !snapshot -> takenDuringRecovery )
2085+ serialized_snapshot .subxcnt = 0 ;
2086+
20792087 /* Copy struct to possibly-unaligned buffer */
20802088 memcpy (start_address ,
20812089 & serialized_snapshot , sizeof (SerializedSnapshotData ));
@@ -2092,9 +2100,6 @@ SerializeSnapshot(Snapshot snapshot, char *start_address)
20922100 * snapshot taken during recovery; all the top-level XIDs are in subxip as
20932101 * well in that case, so we mustn't lose them.
20942102 */
2095- if (serialized_snapshot .suboverflowed && !snapshot -> takenDuringRecovery )
2096- serialized_snapshot .subxcnt = 0 ;
2097-
20982103 if (serialized_snapshot .subxcnt > 0 )
20992104 {
21002105 Size subxipoff = sizeof (SerializedSnapshotData ) +
You can’t perform that action at this time.
0 commit comments