fsync-backup_label.patch

text/x-diff

Filename: fsync-backup_label.patch
Type: text/x-diff
Part: 0
Message: empty backup_label

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: context
File+
src/backend/access/transam/xlog.c 1 0
*** a/src/backend/access/transam/xlog.c
--- b/src/backend/access/transam/xlog.c
***************
*** 9311,9316 **** do_pg_start_backup(const char *backupidstr, bool fast, char **labelfile)
--- 9311,9317 ----
  								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,