From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Improve tuplestore's error messages for I/O failures. |
Date: | 2014-06-12 22:59:19 |
Message-ID: | E1WvDxn-0008RJ-Oa@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Improve tuplestore's error messages for I/O failures.
We should report the errno when we get a failure from functions like
BufFileWrite. "ERROR: write failed" is unreasonably taciturn for a
case that's well within the realm of possibility; I've seen it a
couple times in the buildfarm recently, in situations that were
probably out-of-disk-space, but it'd be good to see the errno
to confirm it.
I think this code was originally written without assuming that
the buffile.c functions would return useful errno; but most other
callers *are* assuming that, and a quick look at the buffile code
gives no reason to suppose otherwise.
Also, a couple of the old messages were phrased on the assumption
that a short read might indicate a logic bug in tuplestore itself;
but that code's pretty well tested by now, so a filesystem-level
problem seems much more likely.
Branch
------
REL9_4_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/3ba1776c568e36423ee66892481b6d1703f4fbd8
Modified Files
--------------
src/backend/utils/sort/logtape.c | 5 +--
src/backend/utils/sort/tuplestore.c | 64 +++++++++++++++++++++++++----------
2 files changed, 47 insertions(+), 22 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-06-13 00:15:13 | pgsql: Fix pg_restore's processing of old-style BLOB COMMENTS data. |
Previous Message | Tom Lane | 2014-06-12 21:51:58 | pgsql: Adjust largeobject regression test to leave a couple of LOs behi |