Re: pgsql: Add TIDStore, to store sets of TIDs (ItemPointerData) efficientl

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Masahiko Sawada <msawada(at)postgresql(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Add TIDStore, to store sets of TIDs (ItemPointerData) efficientl
Date: 2024-03-25 22:16:17
Message-ID: CAApHDvojg82NDaDEpj1WEZSbVTafj=DRmW+FrkBdW8ScL4OFxA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, 21 Mar 2024 at 14:10, Masahiko Sawada <msawada(at)postgresql(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2024-03-25 22:20:06 Re: pgsql: make dist uses git archive
Previous Message Tom Lane 2024-03-25 21:45:25 pgsql: Refactor predicate_{implied,refuted}_by_simple_clause.