Fix buffile.c error handling.
Convert buffile.c error handling to use ereport. This fixes cases where
I/O errors were indistinguishable from EOF or not reported. Also remove
"%m" from error messages where errno would be bogus. While we're
modifying those strings, add block numbers and short read byte counts
where appropriate.
Back-patch to all supported releases.
Reported-by: Amit Khandekar <amitdkhan.pg@gmail.com>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Alvaro Herrera <alvherre@2ndquadrant.com>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Ibrar Ahmed <ibrar.ahmad@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CA%2BhUKGJE04G%3D8TLK0DLypT_27D9dR8F1RQgNp0jK6qR0tZGWOw%40mail.gmail.com
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/9c14d602436543067f1a5403cff2f8c2e6f13403
Modified Files
--------------
src/backend/access/gist/gistbuildbuffers.c | 24 +++++--------
src/backend/executor/nodeHashjoin.c | 24 +++++--------
src/backend/storage/file/buffile.c | 56 +++++++++++++++++-------------
src/backend/utils/sort/logtape.c | 19 ++++++----
src/backend/utils/sort/sharedtuplestore.c | 21 +++++------
src/backend/utils/sort/tuplestore.c | 56 +++++++++++++-----------------
6 files changed, 95 insertions(+), 105 deletions(-)