Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-02-27 Thread Drouvot, Bertrand
Hi, On 2/27/23 6:27 AM, Amit Kapila wrote: On Fri, Feb 17, 2023 at 7:44 PM Drouvot, Bertrand wrote: On 2/16/23 1:26 PM, Drouvot, Bertrand wrote: Hi, On 2/16/23 12:00 PM, Amit Kapila wrote: BTW, feel free to create the second patch (to align the types for variables/arguments) as that would

Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-02-26 Thread Amit Kapila
On Fri, Feb 17, 2023 at 7:44 PM Drouvot, Bertrand wrote: > > On 2/16/23 1:26 PM, Drouvot, Bertrand wrote: > > Hi, > > > > On 2/16/23 12:00 PM, Amit Kapila wrote: > > > >> BTW, feel free to create the second patch > >> (to align the types for variables/arguments) as that would be really > >> helpfu

Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-02-17 Thread Amit Kapila
On Fri, Feb 17, 2023 at 9:43 AM Andres Freund wrote: > > On 2023-02-17 08:30:09 +0530, Amit Kapila wrote: > > Thanks, I was not completely sure about whether we need to bump > > XLOG_PAGE_MAGIC for this patch as this makes the additional space just > > by changing the datatype of one of the member

Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-02-17 Thread Drouvot, Bertrand
Hi, On 2/16/23 1:26 PM, Drouvot, Bertrand wrote: Hi, On 2/16/23 12:00 PM, Amit Kapila wrote: BTW, feel free to create the second patch (to align the types for variables/arguments) as that would be really helpful after we commit this one. Please find attached a patch proposal to do so. It l

Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-02-16 Thread Andres Freund
Hi On 2023-02-17 08:30:09 +0530, Amit Kapila wrote: > Thanks, I was not completely sure about whether we need to bump > XLOG_PAGE_MAGIC for this patch as this makes the additional space just > by changing the datatype of one of the members of the existing WAL > record. We normally change it for th

Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-02-16 Thread Amit Kapila
On Thu, Feb 16, 2023 at 8:39 PM Drouvot, Bertrand wrote: > > On 2/16/23 1:26 PM, Drouvot, Bertrand wrote: > > Hi, > > > > On 2/16/23 12:00 PM, Amit Kapila wrote: > >> I think this would require XLOG_PAGE_MAGIC as it changes the WAL record. > >> > > > > Oh, I Was not aware about it, thanks! Will do

Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-02-16 Thread Drouvot, Bertrand
Hi, On 2/16/23 1:26 PM, Drouvot, Bertrand wrote: Hi, On 2/16/23 12:00 PM, Amit Kapila wrote: I think this would require XLOG_PAGE_MAGIC as it changes the WAL record. Oh, I Was not aware about it, thanks! Will do in V2 (and in the logical decoding on standby patch as it adds the new field me

Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-02-16 Thread Drouvot, Bertrand
Hi, On 2/16/23 12:00 PM, Amit Kapila wrote: On Wed, Feb 15, 2023 at 3:35 AM Nathan Bossart wrote: On Sat, Jan 21, 2023 at 06:42:08AM +0100, Drouvot, Bertrand wrote: On 1/20/23 9:01 PM, Nathan Bossart wrote: Should we also change the related variables (e.g., ndeletable in _hash_vacuum_one_pa

Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-02-16 Thread Amit Kapila
On Wed, Feb 15, 2023 at 3:35 AM Nathan Bossart wrote: > > On Sat, Jan 21, 2023 at 06:42:08AM +0100, Drouvot, Bertrand wrote: > > On 1/20/23 9:01 PM, Nathan Bossart wrote: > >> Should we also change the related > >> variables (e.g., ndeletable in _hash_vacuum_one_page()) to uint16? > > > > Yeah, I

Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-02-14 Thread Nathan Bossart
On Sat, Jan 21, 2023 at 06:42:08AM +0100, Drouvot, Bertrand wrote: > On 1/20/23 9:01 PM, Nathan Bossart wrote: >> Should we also change the related >> variables (e.g., ndeletable in _hash_vacuum_one_page()) to uint16? > > Yeah, I thought about it too. What I saw is that there is other places that

Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-01-20 Thread Drouvot, Bertrand
Hi, On 1/20/23 9:01 PM, Nathan Bossart wrote: 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 th

Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

2023-01-20 Thread Nathan Bossart
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.ntodele