projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8fb54e9
)
fsync backup_label after pg_start_backup()
author
Simon Riggs
Tue, 7 Aug 2012 15:22:58 +0000
(16:22 +0100)
committer
Simon Riggs
Tue, 7 Aug 2012 15:22:58 +0000
(16:22 +0100)
Dave Kerr, backpatched by Simon Riggs
src/backend/access/transam/xlog.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/access/transam/xlog.c
b/src/backend/access/transam/xlog.c
index 0cab155fcfa6fef083f2ec5e28dfff3de8270f24..9a9b04f242224c190d93be335e38ca8f5f5e5d3d 100644
(file)
--- a/
src/backend/access/transam/xlog.c
+++ b/
src/backend/access/transam/xlog.c
@@
-8546,7
+8546,7
@@
pg_start_backup(PG_FUNCTION_ARGS)
checkpointloc.xlogid, checkpointloc.xrecoff);
fprintf(fp, "START TIME: %s\n", strfbuf);
fprintf(fp, "LABEL: %s\n", backupidstr);
- if (fflush(fp) || ferror(fp) || FreeFile(fp))
+ if (fflush(fp) || ferror(fp) ||
pg_fsync(fileno(fp)) != 0 ||
FreeFile(fp))
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not write file \"%s\": %m",