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

Commit 9bebdd3

Browse files
committed
Fix marking segment as new in snapshot
1 parent 917d70c commit 9bebdd3

File tree

1 file changed

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

1 file changed

+6
-5
lines changed

src/backend/storage/file/fd.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,11 +1502,6 @@ PathNameOpenFilePerm(const char *fileName, int fileFlags, mode_t fileMode)
15021502
}
15031503
++nfile;
15041504

1505-
if (SFS_KEEPING_SNAPSHOT() && (fileFlags & O_EXCL))
1506-
{
1507-
OpenSnapshotFiles(vfdP, ControlFile->recent_snapshot, true);
1508-
pg_atomic_write_u32(&vfdP->snap_map->size, SFS_NEW_FILE_MARKER);
1509-
}
15101505
DO_DB(elog(LOG, "PathNameOpenFile: success %d",
15111506
vfdP->fd));
15121507

@@ -1521,6 +1516,12 @@ PathNameOpenFilePerm(const char *fileName, int fileFlags, mode_t fileMode)
15211516
vfdP->fdstate = 0x0;
15221517
vfdP->resowner = NULL;
15231518

1519+
if (SFS_KEEPING_SNAPSHOT() && (fileFlags & O_EXCL))
1520+
{
1521+
OpenSnapshotFiles(vfdP, ControlFile->recent_snapshot, true);
1522+
pg_atomic_write_u32(&vfdP->snap_map->size, SFS_NEW_FILE_MARKER);
1523+
}
1524+
15241525
return file;
15251526
}
15261527

0 commit comments

Comments
 (0)