We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fb54e9 commit c0751d3Copy full SHA for c0751d3
src/backend/access/transam/xlog.c
@@ -8546,7 +8546,7 @@ pg_start_backup(PG_FUNCTION_ARGS)
8546
checkpointloc.xlogid, checkpointloc.xrecoff);
8547
fprintf(fp, "START TIME: %s\n", strfbuf);
8548
fprintf(fp, "LABEL: %s\n", backupidstr);
8549
- if (fflush(fp) || ferror(fp) || FreeFile(fp))
+ if (fflush(fp) || ferror(fp) || pg_fsync(fileno(fp)) != 0 || FreeFile(fp))
8550
ereport(ERROR,
8551
(errcode_for_file_access(),
8552
errmsg("could not write file \"%s\": %m",
0 commit comments