Re: amcheck support for BRIN indexes

2025-08-03 Thread Arseniy Mukhin
On Fri, Aug 1, 2025 at 11:22 PM Arseniy Mukhin wrote: > > Hi, > > On Tue, Jul 22, 2025 at 6:43 PM Arseniy Mukhin > wrote: > > > > Hi, > > > > While reviewing gist amcheck patch [1] I realized that brin amcheck > > also must check if current snapshot is OK with index indcheckxmin (as > > btree, gi

Re: amcheck support for BRIN indexes

2025-08-01 Thread Arseniy Mukhin
Hi, On Tue, Jul 22, 2025 at 6:43 PM Arseniy Mukhin wrote: > > Hi, > > While reviewing gist amcheck patch [1] I realized that brin amcheck > also must check if current snapshot is OK with index indcheckxmin (as > btree, gist do it). Currently this check is contained in btree amcheck > code, but ot

Re: amcheck support for BRIN indexes

2025-07-22 Thread Arseniy Mukhin
Hi, While reviewing gist amcheck patch [1] I realized that brin amcheck also must check if current snapshot is OK with index indcheckxmin (as btree, gist do it). Currently this check is contained in btree amcheck code, but other AMs need it for heapallindexed as well, so I moved it from btree to v

Re: amcheck support for BRIN indexes

2025-07-08 Thread Arseniy Mukhin
On Tue, Jul 8, 2025 at 4:21 PM Tomas Vondra wrote: > > > > On 7/8/25 14:40, Arseniy Mukhin wrote: > > On Mon, Jul 7, 2025 at 3:21 PM Álvaro Herrera wrote: > >> > >> On 2025-Jul-07, Tomas Vondra wrote: > >> > >>> Alvaro, what's your opinion on the introduction of the new WITHIN_RANGE? > >>> I'd pr

Re: amcheck support for BRIN indexes

2025-07-08 Thread Tomas Vondra
On 7/8/25 14:40, Arseniy Mukhin wrote: > On Mon, Jul 7, 2025 at 3:21 PM Álvaro Herrera wrote: >> >> On 2025-Jul-07, Tomas Vondra wrote: >> >>> Alvaro, what's your opinion on the introduction of the new WITHIN_RANGE? >>> I'd probably try to do this using the regular consistent function: >>> >>>

Re: amcheck support for BRIN indexes

2025-07-08 Thread Arseniy Mukhin
On Mon, Jul 7, 2025 at 3:21 PM Álvaro Herrera wrote: > > On 2025-Jul-07, Tomas Vondra wrote: > > > Alvaro, what's your opinion on the introduction of the new WITHIN_RANGE? > > I'd probably try to do this using the regular consistent function: > > > > (a) we don't need to add stuff to all BRIN opcl

Re: amcheck support for BRIN indexes

2025-07-07 Thread Álvaro Herrera
On 2025-Jul-07, Tomas Vondra wrote: > Alvaro, what's your opinion on the introduction of the new WITHIN_RANGE? > I'd probably try to do this using the regular consistent function: > > (a) we don't need to add stuff to all BRIN opclasses to support this > > (b) it gives us additional testing of t

Re: amcheck support for BRIN indexes

2025-07-07 Thread Tomas Vondra
On 7/7/25 13:06, Arseniy Mukhin wrote: > On Sun, Jul 6, 2025 at 10:49 PM Álvaro Herrera 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 >>>

Re: amcheck support for BRIN indexes

2025-07-06 Thread Álvaro Herrera
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 introd

Re: amcheck support for BRIN indexes

2025-06-21 Thread Arseniy Mukhin
Hi, I would like share some thoughts about 'heap all consistent' part and one of the open questions: The idea behind 'heap all consistent' is to use heap data to validate the index. BRIN doesn't store heap tuples, so there is no straightforward way to check if every tuple was indexed or not. We h

Re: amcheck support for BRIN indexes

2025-06-19 Thread Arseniy Mukhin
On Wed, Jun 18, 2025 at 2:39 PM Andrey Borodin wrote: > > > > > On 18 Jun 2025, at 11:33, Arseniy Mukhin > > wrote: > > > > Interesting, I used btree check as reference when started > > writing brin check, and in btree check there 53 > > ERRCODE_INDEX_CORRUPTED ereports and only 1 ERRCODE_DATA_C

Re: amcheck support for BRIN indexes

2025-06-18 Thread Andrey Borodin
> On 18 Jun 2025, at 11:33, Arseniy Mukhin wrote: > > Interesting, I used btree check as reference when started > writing brin check, and in btree check there 53 > ERRCODE_INDEX_CORRUPTED ereports and only 1 ERRCODE_DATA_CORRUPTED > ereport. So it was very hard to do, but I managed to pick the

Re: amcheck support for BRIN indexes

2025-06-18 Thread Arseniy Mukhin
On Mon, Jun 9, 2025 at 1:16 AM Tomas Vondra wrote: > > On 6/8/25 14:39, Arseniy Mukhin wrote: > > Hi, > > > > Here is a new version. > > > > TAP tests were added. Tried to reproduce more or less every violation. > > I don't include 2 tests where disk representation ItemIdData needs to > > be chang

Re: amcheck support for BRIN indexes

2025-06-16 Thread Andrey Borodin
Hi! Nice feature! > On 8 Jun 2025, at 17:39, Arseniy Mukhin wrote: > > +#define BRIN_MAX_PAGES_PER_RANGE 131072 I'd personally prefer some words on where does this limit come from. I'm not a BRIN pro, just curious. Or, at least, maybe we can use a form 128 * 1024, if it's just a sane

Re: amcheck support for BRIN indexes

2025-06-08 Thread Tomas Vondra
On 6/8/25 14:39, Arseniy Mukhin wrote: > Hi, > > Here is a new version. > > TAP tests were added. Tried to reproduce more or less every violation. > I don't include 2 tests where disk representation ItemIdData needs to > be changed: it works locally, but I don't think these tests are > portable.

Re: amcheck support for BRIN indexes

2025-06-08 Thread Arseniy Mukhin
Hi, Here is a new version. TAP tests were added. Tried to reproduce more or less every violation. I don't include 2 tests where disk representation ItemIdData needs to be changed: it works locally, but I don't think these tests are portable. While writing tests some minor issues were found and fi

amcheck support for BRIN indexes

2025-04-22 Thread Arseniy Mukhin
Hi, It's not for v18, just wanted to share with the community and register it in the upcoming Commitfest 2025-07. Here is the patch with amcheck support for BRIN indexes. Patch uses amcheck common infrastructure that was introduced in [1]. It works and I deleted all the code that I copied