Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16
Date: 2023-01-20 20:01:55
Message-ID: 20230120200155.GA4922@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 10, 2023 at 11:08:33AM +0100, Drouvot, Bertrand wrote:
> While working on [1], I noticed that xl_hash_vacuum_one_page.ntuples is an int.
>
> Unless I'm missing something, It seems to me that it would make more sense to use an uint16 (like this is done for
> gistxlogDelete.ntodelete for example).

I think that is correct. This value is determined by looping through
offsets, which are uint16 as well. Should we also change the related
variables (e.g., ndeletable in _hash_vacuum_one_page()) to uint16?

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Karl O. Pinc 2023-01-20 20:22:25 Re: Doc: Rework contrib appendix -- informative titles, tweaked sentences
Previous Message Nathan Bossart 2023-01-20 19:39:56 Re: Question regarding "Make archiver process an auxiliary process. commit"