Commit 0f04fc67 authored by Simon Riggs's avatar Simon Riggs

fsync backup_label after pg_start_backup()

Dave Kerr
parent b112df84
...@@ -9346,6 +9346,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, char **labelfile) ...@@ -9346,6 +9346,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, char **labelfile)
BACKUP_LABEL_FILE))); BACKUP_LABEL_FILE)));
if (fwrite(labelfbuf.data, labelfbuf.len, 1, fp) != 1 || if (fwrite(labelfbuf.data, labelfbuf.len, 1, fp) != 1 ||
fflush(fp) != 0 || fflush(fp) != 0 ||
pg_fsync(fileno(fp)) != 0 ||
ferror(fp) || ferror(fp) ||
FreeFile(fp)) FreeFile(fp))
ereport(ERROR, ereport(ERROR,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment