Fix buffile.c error handling.
Thomas Munro <tmunro@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/gist/gistbuildbuffers.c | modified | +9 −15 |
| src/backend/executor/nodeHashjoin.c | modified | +8 −16 |
| src/backend/replication/backup_manifest.c | modified | +2 −7 |
| src/backend/storage/file/buffile.c | modified | +22 −23 |
| src/backend/utils/sort/logtape.c | modified | +13 −6 |
| src/backend/utils/sort/sharedtuplestore.c | modified | +9 −12 |
| src/backend/utils/sort/tuplestore.c | modified | +25 −31 |
Discussion
- BufFileRead() error signalling 28 messages · 2019-11-20 → 2020-06-16