Re: Online checksums verification in the backend - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Online checksums verification in the backend
Date
Msg-id CABUevEy+vPu3_FPf+nKizmEjQm-hrKt_h3GgqS_Ohknq7yNFuQ@mail.gmail.com
Whole thread Raw
In response to Re: Online checksums verification in the backend  (Andres Freund <andres@anarazel.de>)
Responses Re: Online checksums verification in the backend  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Mon, Nov 2, 2020 at 8:35 PM Andres Freund <andres@anarazel.de> wrote:
>
> Hi,
>
> On 2020-11-02 12:35:30 -0500, Robert Haas wrote:
> > It feels really confusing to me that the user-exposed function here is
> > called pg_relation_check_pages(). How is the user supposed to
> > understand the difference between what this function does and what the
> > new verify_heapam() in amcheck does? The answer is that the latter
> > does far more extensive checks, but this isn't obvious from the SGML
> > documentation, which says only that the blocks are "verified," as if
> > an end-user can reasonably be expected to know what that means. It
> > seems likely to lead users to the belief that if this function passes,
> > they are in good shape, which is extremely far from being true. Just
> > look at what PageIsVerified() checks compared to what verify_heapam()
> > checks.
>
> Yea I had similar thoughts, it should just be called
> pg_checksum_verify_relation() or something.
>

+1.


> > In fact, I would argue that this functionality ought to live in
> > amcheck rather than core, though there could usefully be enabling
> > functions in core.
>
> I'm not really convinced by this though. It's not really AM
> specific - works for all types of relations with storage; don't really
> object either...

Yeah, I'm not sure about that one either. Also what would happen
if/when we get checksums on things that aren't even relations? (though
maybe that goes for other parts of amcheck at some point as well?)


-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: ModifyTable overheads in generic plans
Next
From: Erikjan Rijkers
Date:
Subject: Re: Split copy.c