Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cc65a20

Browse files
committed
Reset invalid backend snapshot
1 parent 15699cc commit cc65a20

File tree

1 file changed

+6
-1
lines changed
  • src/backend/storage/file

1 file changed

+6
-1
lines changed

src/backend/storage/file/fd.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2024,8 +2024,10 @@ FileRead(File file, char *buffer, int amount, uint32 wait_event_info)
20242024
if (current_snapshot != SFS_INVALID_SNAPSHOT)
20252025
{
20262026
if (current_snapshot < ControlFile->oldest_snapshot || current_snapshot > ControlFile->recent_snapshot)
2027+
{
2028+
sfs_backend_snapshot = SFS_INVALID_SNAPSHOT;
20272029
elog(ERROR, "Snapshot %d is not valid any more", current_snapshot);
2028-
2030+
}
20292031
Assert(!FilePosIsUnknown(vfdP->seekPos));
20302032

20312033
/* Look for original page in the active or any subsequent snapshots */
@@ -2358,7 +2360,10 @@ FileSeek(File file, off_t offset, int whence)
23582360
if (current_snapshot != SFS_INVALID_SNAPSHOT)
23592361
{
23602362
if (current_snapshot < ControlFile->oldest_snapshot || current_snapshot > ControlFile->recent_snapshot)
2363+
{
2364+
sfs_backend_snapshot = SFS_INVALID_SNAPSHOT;
23612365
elog(ERROR, "Snapshot %d is not valid any more", current_snapshot);
2366+
}
23622367
/* Look for original page in the active or any subsequent snapshots */
23632368
for (snap_id = current_snapshot; snap_id <= ControlFile->recent_snapshot; snap_id++)
23642369
{

0 commit comments

Comments
 (0)