Re: amcheck support for BRIN indexes

From: Arseniy Mukhin <arseniy(dot)mukhin(dot)dev(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: amcheck support for BRIN indexes
Date: 2025-07-07 11:06:24
Message-ID: CAE7r3MKr7oGnT5o8jEa91PEBZwo-bWg0d6P1N-Xx9AqQ_KjL5A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jul 6, 2025 at 10:49 PM Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
>
> On 2025-Jul-06, Arseniy Mukhin wrote:
>
> > Sorry, forget to run a full test run with the new patch version. Some
> > tests were unhappy with the new unknown support function. Here the new
> > version with the fix.
>
> Hello, I think this patch is probably a good idea. I don't think it
> makes sense to introduce a bunch of code in 0003 only to rewrite it
> completely in 0005. I would ask that you re-split your WITHIN_RANGE
> (0004) to appear before the amcheck code, and then write the amcheck
> code using that new functionality.

Hi, Álvaro!

Thank you for looking into this.

OK, we can easily revert to the version with consistent function if
needed, so let's get rid of it.

>
> > /*
> > * Return a tuple descriptor used for on-disk storage of BRIN tuples.
> > */
> > -static TupleDesc
> > +TupleDesc
> > brtuple_disk_tupdesc(BrinDesc *brdesc)
>
> I think we should give this function a better name if it's going to be
> exported. How about brin_tuple_tupdesc? (in brin_tuple.h we
> seem to distinguish "brin tuples" which are the stored ones, from "brin
> mem tuples" which are the ones to be used in memory.)
>

'brin_tuple_tupdesc' sounds good to me. Done.

So here is a new version. 0001, 0002 - index structure check. 0003,
0004 - all heap indexed using WITHIN_RANGE approach.

Thank you!

Best regards,
Arseniy Mukhin

Attachment Content-Type Size
v7-0001-brin-refactoring.patch text/x-patch 4.1 KB
v7-0002-amcheck-brin_index_check-index-structure-check.patch text/x-patch 46.9 KB
v7-0003-Adds-new-BRIN-support-function-withinRange.patch text/x-patch 52.6 KB
v7-0004-amcheck-brin_index_check-heap-all-indexed.patch text/x-patch 25.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-07-07 11:57:42 Re: Changing shared_buffers without restart
Previous Message Peter Eisentraut 2025-07-07 10:51:40 Re: C11 / VS 2019