fsync backup_label after pg_start_backup()

Dave Kerr
This commit is contained in:
Simon Riggs 2012-08-07 16:20:32 +01:00
parent 73a7a6460e
commit 393b07004e

View File

@ -9350,6 +9350,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, char **labelfile)
BACKUP_LABEL_FILE)));
if (fwrite(labelfbuf.data, labelfbuf.len, 1, fp) != 1 ||
fflush(fp) != 0 ||
pg_fsync(fileno(fp)) != 0 ||
ferror(fp) ||
FreeFile(fp))
ereport(ERROR,