Re: Amcheck verification of GiST and GIN - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Amcheck verification of GiST and GIN
Date
Msg-id CAH2-WznWMnmmyOyQt-M1htzzrrPMHyB-u-6AssG1GiwkjhoaTQ@mail.gmail.com
Whole thread Raw
In response to Re: Amcheck verification of GiST and GIN  (Nikolay Samokhvalov <samokhvalov@gmail.com>)
List pgsql-hackers
On Thu, Feb 2, 2023 at 12:56 PM Nikolay Samokhvalov
<samokhvalov@gmail.com> wrote:
> I already realized my mistake – indeed, having multiple errors for 1 index
> doesn't seem to be super practically helpful.

I wouldn't mind supporting it if the cost wasn't too high. But I
believe that it's not a good trade-off.

>> I think that that problem should be solved at a higher level, in the
>> program that runs amcheck. Note that pg_amcheck will already do this
>> for B-Tree indexes.
>
>
> That's a great tool, and it's great it supports parallelization, very useful
> on large machines.

Another big advantage of just using pg_amcheck is that running each
index verification in a standalone query avoids needlessly holding the
same MVCC snapshot across all indexes verified (compared to running
one big SQL query that verifies multiple indexes). As simple as
pg_amcheck's approach is (it's doing nothing that you couldn't
replicate in a shell script), in practice that its standardized
approach probably makes things a lot smoother, especially in terms of
how VACUUM is impacted.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Remove unused code related to iso-8859-1 type
Next
From: Corey Huinker
Date:
Subject: Re: Remove some useless casts to (void *)