Re: pageinspect get_raw_page() option to return invalid pages

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pageinspect get_raw_page() option to return invalid pages
Date: 2018-05-04 22:16:57
Message-ID: CAH2-WzmUmpbmoOu78S6DvDWGw2OOoJK_6sxXHvHs04wptG-R0Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 4, 2018 at 11:56 AM, Andres Freund <andres(at)anarazel(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-05-04 22:21:31 Re: --enable-ccache configure option
Previous Message Merlin Moncure 2018-05-04 21:54:55 Re: Built-in connection pooling