Re: pgsql: Add TIDStore, to store sets of TIDs (ItemPointerData) efficientl - Mailing list pgsql-committers

From David Rowley
Subject Re: pgsql: Add TIDStore, to store sets of TIDs (ItemPointerData) efficientl
Date
Msg-id CAApHDvojg82NDaDEpj1WEZSbVTafj=DRmW+FrkBdW8ScL4OFxA@mail.gmail.com
Whole thread Raw
In response to pgsql: Add TIDStore, to store sets of TIDs (ItemPointerData) efficientl  (Masahiko Sawada <msawada@postgresql.org>)
Responses Re: pgsql: Add TIDStore, to store sets of TIDs (ItemPointerData) efficientl
List pgsql-committers
On Thu, 21 Mar 2024 at 14:10, Masahiko Sawada <msawada@postgresql.org> wrote:
>
> Add TIDStore, to store sets of TIDs (ItemPointerData) efficiently.

> src/backend/access/common/tidstore.c               | 463 +++++++++++++++++++++

I was looking at this code and I saw the following:

/* choose the maxBlockSize to be no larger than 1/16 of max_bytes */
while (16 * maxBlockSize > max_bytes * 1024L)
    maxBlockSize >>= 1;

I saw the "* 1024L" and was confused by it.  "max_bytes * 1024L"
converts the number of bytes into "millibytes" ([1]), which I don't
think is correct.

Either "max_bytes" is a bad name for this variable or the * 1024L
should be removed.

David

[1] https://www.convertunits.com/info/millibyte



pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Refactor predicate_{implied,refuted}_by_simple_clause.
Next
From: Andrew Dunstan
Date:
Subject: Re: pgsql: make dist uses git archive