Re: Patch: Global Unique Index

Поиск
Список
Период
Сортировка
От Dilip Kumar
Тема Re: Patch: Global Unique Index
Дата
Msg-id CAFiTN-tW=0sAs=pGSdTmKHfgeh2hQ6cYpRrz4DYR_1gUToC+0w@mail.gmail.com
обсуждение исходный текст
Ответ на Patch: Global Unique Index  (Cary Huang <cary.huang@highgo.ca>)
Ответы Re: Patch: Global Unique Index  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-hackers
On Fri, Nov 18, 2022 at 3:31 AM Cary Huang <cary.huang@highgo.ca> wrote:
>
> Patch: Global Unique Index
> - Optimizer, query planning and vacuum -
> Since no major modification is done on global unique index's structure and storage, it works in the same way as a
regularpartitioned index. No major change is required to be done on optimizer, planner and vacuum process as they
shouldwork in the same way as regular index. 

It might not need changes in the vacuum to make it work.  But this can
not be really useful without modifying the vacuum the way it works.  I
mean currently, the indexes are also partitioned based on the table so
whenever we do table vacuum it's fine to do index vacuum but now you
will have one gigantic index and which will be vacuumed every time we
vacuum any of the partitions.  So for example, if you have 10000
partitions then by the time you vacuum the whole table (all 10000
partitions) the global index will be vacuumed 10000 times.

There was some effort in past (though it was not concluded) about
decoupling the index and heap vacuuming such that instead of doing the
index vacuum for each partition we remember the dead tids and we only
do the index vacuum when we think there are enough dead items so that
the index vacuum makes sense[1].

[1] https://www.postgresql.org/message-id/CA%2BTgmoZgapzekbTqdBrcH8O8Yifi10_nB7uWLB8ajAhGL21M6A%40mail.gmail.com

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: "Takamichi Osumi (Fujitsu)"
Дата:
Сообщение: RE: Time delayed LR (WAS Re: logical replication restrictions)
Следующее
От: Ted Yu
Дата:
Сообщение: Re: indentation in _hash_pgaddtup()