Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

Поиск
Список
Период
Сортировка
От Drouvot, Bertrand
Тема Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16
Дата
Msg-id 3902292e-cf56-17d5-4b61-d883c82c9f9a@gmail.com
обсуждение исходный текст
Ответ на Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Ответы Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
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 looks like a Pandora's box as it produces
those cascading changes:

     _hash_vacuum_one_page
             index_compute_xid_horizon_for_tuples
                     gistprunepage
                             PageIndexMultiDelete
                             gistXLogDelete
             PageIndexMultiDelete
                     spgRedoVacuumRedirect
                     vacuumRedirectAndPlaceholder
                     spgPageIndexMultiDelete
                             moveLeafs
                             doPickSplit
                     _bt_delitems_vacuum
                             btvacuumpage
                     _bt_delitems_delete
                             _bt_delitems_delete_check
                     hash_xlog_move_page_contents
                     gistvacuumpage
                             gistXLogUpdate
                                     gistplacetopage
                     hashbucketcleanup


Which makes me:

- wonder it is not too intrusive (we could reduce the scope and keep the
PageIndexMultiDelete()'s nitems argument as an int for example).

- worry if there is no side effects (like the one I'm mentioning as a comment
in PageIndexMultiDelete()) even if it passes the CI tests.

- wonder if we should not change MaxIndexTuplesPerPage from int to uint16 too (given
the fact that the maximum block size is 32 KB.

I'm sharing this version but I still need to think about it and
I'm curious about your thoughts too.
  
Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: The output sql generated by pg_dump for a create function refers to a modified table name
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: DDL result is lost by CREATE DATABASE with WAL_LOG strategy