On Wed, Jan 22, 2025 at 11:21:03AM -0500, Andres Freund wrote: > fsync(open(oldname1)); > fsync(open(oldname2)); > .. > fsync(open(oldnameN)); > > rename(oldname1, newname1); > rename(oldname2, newname2); > .. > rename(oldnameN, newnameN); > > fsync(open(newname1)); > fsync(open(newname2)); > .. > fsync(open(newnameN)); > > fsync(open("pg_wal"));
What is the purpose of syncing the file before the rename? -- nathan