mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
fsync backup_label after pg_start_backup()
Dave Kerr
This commit is contained in:
@ -9350,6 +9350,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,
|
||||||
|
Reference in New Issue
Block a user