pgbasebackup.patch
text/x-diff
Filename: pgbasebackup.patch
Type: text/x-diff
Part: 0
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: unified
| File | + | − |
|---|---|---|
| src/bin/pg_basebackup/pg_basebackup.c | 17 | 1 |
diff -uNr postgresql-9.1.2/src/bin/pg_basebackup/pg_basebackup.c postgresql-9.1.2-patch/src/bin/pg_basebackup/pg_basebackup.c
--- postgresql-9.1.2/src/bin/pg_basebackup/pg_basebackup.c 2011-12-01 22:47:20.000000000 +0100
+++ postgresql-9.1.2-patch/src/bin/pg_basebackup/pg_basebackup.c 2012-01-23 13:14:16.000000000 +0100
@@ -410,6 +410,7 @@
{
fprintf(stderr, _("%s: could not write to compressed file \"%s\": %s\n"),
progname, filename, get_gz_error(ztarfile));
+ disconnect_and_exit(1);
}
}
else
@@ -428,7 +429,14 @@
#ifdef HAVE_LIBZ
if (ztarfile)
gzclose(ztarfile);
+ else
#endif
+ if (fflush (tarfile) != 0)
+ {
+ fprintf(stderr, _("%s: error flushing stdout: %s\n"),
+ strerror (errno));
+ disconnect_and_exit(1);
+ }
}
else
{
@@ -437,7 +445,14 @@
gzclose(ztarfile);
#endif
if (tarfile != NULL)
- fclose(tarfile);
+ {
+ if (fclose(tarfile) != 0)
+ {
+ fprintf(stderr, _("%s: error closing file \"%s\": %s\n"),
+ progname, filename, strerror (errno));
+ disconnect_and_exit(1);
+ }
+ }
}
break;
@@ -456,6 +471,7 @@
{
fprintf(stderr, _("%s: could not write to compressed file \"%s\": %s\n"),
progname, filename, get_gz_error(ztarfile));
+ disconnect_and_exit(1);
}
}
else