Hi,
On 2026-02-12 18:34:49 +0000, Zsolt Parragi wrote:
> Also:
>
> if (result.status == PGAIO_RS_ERROR)
> {
> Assert(!zeroed_any); /* can't have invalid pages when zeroing them */
> - affected_count = zeroed_or_error_count;
> - msg_one = _("invalid page in block %u of relation \"%s\"");
>
>
> * The comment after assert seems wrong, isn't it backwards? Can't have
> zeroed pages with failed reads
No, I don't think so. This is just about errors on the bufmgr layer. If
zero_damaged_pages is on, all errors on the bufmgr layer are handled by
zeroing the page.
> * Is it really okay to classify read errors as "invalid pages"? This
> is a read failure, so I imagine this can happen if we lost a disk
> because of faulty/flaky hardware, or a user unmounting a partition, or
> moving the file, or anything like that, so we weren't able to actually
> try to read it.
As mentioned above, this is just about errors on the bufmgr layer. If you have
the entire IO fail, it'll be reported via md.c:md_readv_report(). That case is
simpler, since you can't have a case where parts of the IO had an IO error,
but others worked ok.
Greetings,
Andres Freund