Re: pgsql: Add deduplication to nbtree. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Add deduplication to nbtree.
Date
Msg-id 5838.1583100843@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Add deduplication to nbtree.  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: pgsql: Add deduplication to nbtree.  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-committers
Peter Geoghegan <pg@bowt.ie> writes:
> Attached patch shows how this could work. I prefer my original
> approach, but I can see the argument for doing it this way.

This does seem a bit duplicative ... and shouldn't both code paths
include a final "Assert(d == vacposting->ndeletedtids)"?  So maybe
we're better off just rejecting the Coverity complaint.

> If we keep my original approach, we should still add a new
> "ItemPointerIsValid(&itup->t_tid)" assertion that covers the plain
> tupe case in a way that mirrors the current "_bt_posting_valid(itup)"
> assert.

Another thing that maybe bears closer scrutiny is the size calculation.
It seems a bit confused as to whether the offset of the posting list
within the tuple, or the total tuple size, or both, needs to be
MAXALIGN'd.

            regards, tom lane



pgsql-committers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: pgsql: Add deduplication to nbtree.
Next
From: Peter Geoghegan
Date:
Subject: Re: pgsql: Add deduplication to nbtree.