Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit829f12e

Browse files
Revert1f30295
Reported-by: Tom Lane
1 parentd1fcc62 commit829f12e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎src/backend/utils/time/snapmgr.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff 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
Sizesubxipoff=sizeof(SerializedSnapshotData)+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp