Re: Amcheck verification of GiST and GIN

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
Cc: Andrey Borodin <amborodin86(at)gmail(dot)com>, Jose Arthur Benetasso Villanova <jose(dot)arthur(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Amcheck verification of GiST and GIN
Date: 2023-02-02 23:16:32
Message-ID: CAH2-WznWMnmmyOyQt-M1htzzrrPMHyB-u-6AssG1GiwkjhoaTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 2, 2023 at 12:56 PM Nikolay Samokhvalov
<samokhvalov(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2023-02-02 23:59:44 Re: Remove some useless casts to (void *)
Previous Message Tom Lane 2023-02-02 23:12:46 Re: Remove unused code related to unknown type