Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16 - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16
Date
Msg-id 20230120200155.GA4922@nathanxps13
Whole thread Raw
In response to Change xl_hash_vacuum_one_page.ntuples from int to uint16  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Responses Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16
List 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



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Question regarding "Make archiver process an auxiliary process. commit"
Next
From: "Karl O. Pinc"
Date:
Subject: Re: Doc: Rework contrib appendix -- informative titles, tweaked sentences