pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix buffile.c error handling.
Date: Tue, 16 Jun 2020 05:28:57 +0000
Message-ID: <E1jl49Z-0007y4-C8@gemulon.postgresql.org> (raw)

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_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/28ee126699446e5eb9ef4d83a9d195203e944a18

Modified Files
--------------
src/backend/access/gist/gistbuildbuffers.c | 24 +++++--------
src/backend/executor/nodeHashjoin.c        | 24 +++++--------
src/backend/storage/file/buffile.c         | 45 ++++++++++++------------
src/backend/utils/sort/logtape.c           | 19 ++++++----
src/backend/utils/sort/sharedtuplestore.c  | 21 +++++------
src/backend/utils/sort/tuplestore.c        | 56 +++++++++++++-----------------
6 files changed, 86 insertions(+), 103 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1jl49Z-0007y4-C8@gemulon.postgresql.org>
Permalink:  ../E1jl49Z-0007y4-C8@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jl49Z-0007y4-C8@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Fix buffile.c error handling.
  In-Reply-To: <E1jl49Z-0007y4-C8@gemulon.postgresql.org>
  References: <E1jl49Z-0007y4-C8@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox