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

Commit370a46f

Browse files
committed
Add new snapshot fields to serialize/deserialize functions.
The "snapshot too old" condition was not being recognized whenusing a copied snapshot, since the original timestamp and lsn werenot being passed along. Noticed when testing the combination of"snapshot too old" with parallel query execution.
1 parent6436a85 commit370a46f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ typedef struct SerializedSnapshotData
239239
boolsuboverflowed;
240240
booltakenDuringRecovery;
241241
CommandIdcurcid;
242+
int64whenTaken;
243+
XLogRecPtrlsn;
242244
}SerializedSnapshotData;
243245

244246
Size
@@ -1936,6 +1938,8 @@ SerializeSnapshot(Snapshot snapshot, char *start_address)
19361938
serialized_snapshot->suboverflowed=snapshot->suboverflowed;
19371939
serialized_snapshot->takenDuringRecovery=snapshot->takenDuringRecovery;
19381940
serialized_snapshot->curcid=snapshot->curcid;
1941+
serialized_snapshot->whenTaken=snapshot->whenTaken;
1942+
serialized_snapshot->lsn=snapshot->lsn;
19391943

19401944
/*
19411945
* Ignore the SubXID array if it has overflowed, unless the snapshot was
@@ -2002,6 +2006,8 @@ RestoreSnapshot(char *start_address)
20022006
snapshot->suboverflowed=serialized_snapshot->suboverflowed;
20032007
snapshot->takenDuringRecovery=serialized_snapshot->takenDuringRecovery;
20042008
snapshot->curcid=serialized_snapshot->curcid;
2009+
snapshot->whenTaken=serialized_snapshot->whenTaken;
2010+
snapshot->lsn=serialized_snapshot->lsn;
20052011

20062012
/* Copy XIDs, if present. */
20072013
if (serialized_snapshot->xcnt>0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp