pgsql: Ensure write failure reports no-disk-space

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Ensure write failure reports no-disk-space
Date: 2020-06-19 21:26:58
Message-ID: E1jmOXK-0008Sg-P9@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Ensure write failure reports no-disk-space

A few places calling fwrite and gzwrite were not setting errno to ENOSPC
when reporting errors, as is customary; this led to some failures being
reported as
"could not write file: Success"
which makes us look silly. Make a few of these places in pg_dump and
pg_basebackup use our customary pattern.

Backpatch-to: 9.5
Author: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Author: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Discussion: https://postgr.es/m/20200611153753.GU14879@telsasoft.com

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/bbbce94dc262fa255ec53a9949f899369afdb4e7

Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 12 ++++++++++++
src/bin/pg_dump/pg_backup_directory.c | 19 ++++++++++++++++++-
2 files changed, 30 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2020-06-20 03:52:28 pgsql: Removal unused function parameter in CopyReadBinaryAttribute.
Previous Message Tom Lane 2020-06-19 17:55:55 pgsql: Future-proof regression tests against possibly-missing posixrule