Add BufFileRead variants with short read and EOF detection
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-12-28T10:47:02Z
Lists: pgsql-hackers
Attachments
- 0001-Add-BufFileRead-variants-with-short-read-and-EOF-det.patch (text/plain) patch 0001
Most callers of BufFileRead() want to check whether they read the full specified length. Checking this at every call site is very tedious. This patch provides additional variants BufFileReadExact() and BufFileReadMaybeEOF() that include the length checks. I considered changing BufFileRead() itself, but this function is also used in extensions, and so changing the behavior like this would create a lot of problems there. The new names are analogous to the existing LogicalTapeReadExact().
Commits
-
Add BufFileRead variants with short read and EOF detection
- 20428d344a29 16.0 landed
-
Fix some BufFileRead() error reporting
- cf74b6eadb9d 13.10 landed
- f463335e1f29 14.7 landed
- ac01fa647f84 15.2 landed
- 1561612e3bf3 16.0 landed
-
Push lpp variable closer to usage in heapgetpage()
- e351f8541831 16.0 cited
-
Fix buffile.c error handling.
- 7897e3bb902c 14.0 cited