projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a88e57
)
fsync backup_label after pg_start_backup()
author
Simon Riggs
<
[email protected]
>
Wed, 8 Aug 2012 20:07:35 +0000
(21:07 +0100)
committer
Simon Riggs
<
[email protected]
>
Wed, 8 Aug 2012 20:07:35 +0000
(21:07 +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 47d11b945bd7043c1fc83d4392b98f6e15749908..88f2b3944390bcb5d853f8f1aa58d0866d88464a 100644
(file)
--- a/
src/backend/access/transam/xlog.c
+++ b/
src/backend/access/transam/xlog.c
@@
-6634,7
+6634,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",