Re: BTScanOpaqueData size slows down tests - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: BTScanOpaqueData size slows down tests
Date
Msg-id CAH2-WzkQz32Sitw0ONT0dCsujtWscj4XoYM+KWmhQmZO0vu8RQ@mail.gmail.com
Whole thread Raw
In response to Re: BTScanOpaqueData size slows down tests  (Andres Freund <andres@anarazel.de>)
Responses Re: BTScanOpaqueData size slows down tests
Re: BTScanOpaqueData size slows down tests
List pgsql-hackers
On Wed, Apr 2, 2025 at 11:57 AM Andres Freund <andres@anarazel.de> wrote:
> I'd assume it's extremely rare for there to be this many items on a page. I'd
> guess that something like storing having BTScanPosData->items point to an
> in-line 4-16 BTScanPosItem items_inline[N] and dynamically allocate a
> full-length BTScanPosItem[MaxTIDsPerBTreePage] just in the cases it's needed.

There can still only be MaxIndexTuplesPerPage items on the page (407
if memory serves) -- deduplication didn't change that.

It isn't at all rare for the scan to have to return about 1350 TIDs
from a page, though. Any low cardinality index will tend to have
almost that many TIDs to return on any page that only stores
duplicates. And scan will necessarily have to return all of the TIDs
from such a page, if it has to return any.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: BTScanOpaqueData size slows down tests
Next
From: Tom Lane
Date:
Subject: Re: BTScanOpaqueData size slows down tests