Michael Paquier <michael@paquier.xyz> writes:
> diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c
> index 87942b4cca..d487347cc6 100644
> --- a/src/backend/access/transam/slru.c
> +++ b/src/backend/access/transam/slru.c
> @@ -683,6 +683,11 @@ SlruPhysicalReadPage(SlruCtl ctl, int pageno, int slotno)
> pgstat_report_wait_start(WAIT_EVENT_SLRU_READ);
> if (read(fd, shared->page_buffer[slotno], BLCKSZ) != BLCKSZ)
> {
> + /*
> + * XXX: Note that this may actually report sucess if the number
> + * of bytes read is positive, but lacking data so that errno is
> + * not set.
> + */
> pgstat_report_wait_end();
> slru_errcause = SLRU_READ_FAILED;
> slru_errno = errno;
It might be less confusing to just set errno if it's not set already
(e.g., to EIO, or something). Up to you though - this is a bit of a
niche case.
The rest of the patch looks good to me.
Thanks,
--Robbie