Re: pageinspect get_raw_page() option to return invalid pages - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: pageinspect get_raw_page() option to return invalid pages
Date
Msg-id CAH2-WzmUmpbmoOu78S6DvDWGw2OOoJK_6sxXHvHs04wptG-R0Q@mail.gmail.com
Whole thread Raw
In response to Re: pageinspect get_raw_page() option to return invalid pages  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Fri, May 4, 2018 at 11:56 AM, Andres Freund <andres@anarazel.de> wrote:
> Can you expand on what they want?
>
> - Avoid polluting caches? Why's the ringbuffer logic not good enough?
> - Continue after a checksum or similar failure? That seems a bit useless
>   for amcheck imo? You know there's corruption at that point after all.
> - Read on disk data, bypassing shared buffers? That'd present a lot of
>   coherency issues, no?

I think that "Read on-disk data" would be a compelling feature in
certain environments. It would present some concurrency issues, but
those seem solvable. The only thing that the "!readonly &&
!heapallindexed" checks need that complicates things is a snapshot
that prevents concurrent recycling by VACUUM. If we gave up on the
cross-page invariant check, then we wouldn't even need to worry about
concurrent recycling by VACUUM, while still offering almost the same
coverage as "!readonly && !heapallindexed" (I suppose we'd also have
to give up on the level cross-check that you suggested when v1 of
amcheck went in, too, but I think that that's it).

Maybe it would a better use of my time to focus on making this
accessible to backup tools, that should ideally work without needing
to acquire any MVCC snapshot. Probably from a front-end utility. We'd
need to export at least some operator class functionality to make that
work, though.

-- 
Peter Geoghegan


pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Built-in connection pooling
Next
From: Tom Lane
Date:
Subject: Re: --enable-ccache configure option