Re: Online checksums verification in the backend

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Subject: Re: Online checksums verification in the backend
Date: 2020-11-03 08:31:20
Message-ID: CABUevEy+vPu3_FPf+nKizmEjQm-hrKt_h3GgqS_Ohknq7yNFuQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 2, 2020 at 8:35 PM Andres Freund <andres(at)anarazel(dot)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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Erikjan Rijkers 2020-11-03 08:46:36 Re: Split copy.c
Previous Message Amit Langote 2020-11-03 08:27:52 Re: ModifyTable overheads in generic plans