git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b112df8)
fsync backup_label after pg_start_backup()
Tue, 7 Aug 2012 15:19:13 +0000 (16:19 +0100)
Tue, 7 Aug 2012 15:19:13 +0000 (16:19 +0100)
Dave Kerr


diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index a73cd6b9dec1a44f37842627e6c46cf3c05d3112..efd0347bc9bbd8f714ac07042114465416fccdf8 100644 (file)
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -9346,6 +9346,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,
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /