[HACKERS] Optimise default partition scanning while adding new partition

Поиск
Список
Период
Сортировка
От Jeevan Ladhe
Тема [HACKERS] Optimise default partition scanning while adding new partition
Дата
Msg-id CAOgcT0MWwG8WBw8frFMtRYHAgDD=tpt6U7WcsO_L2k0KYpm4Jg@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] Optimise default partition scanning while adding newpartition  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
Hi,

Commit 6f6b99d1335be8ea1b74581fc489a97b109dd08a introduced default
partitioning support. This commit added a new function check_default_allows_bound(),
which checks if there exists a row in the default partition that would belong to
the new partition being added. If it finds one, it throws an error. Before taking
the decision to scan the default partition, this function checks if there are
existing constraints on default partition that would imply the new partition
constraints, if yes it skips scanning the default partition, otherwise it scans the
default partition and its children(if any). But, while doing so the current code
misses the fact that there can be constraints on the child of default partition
such that they would imply the constraints of the new partition being added,
and hence individual child scan can also be skipped.
Attached is the patch which does this.

This is previously discussed in default partitioning thread[1], and decision
was made that we can take this a separate patch rather than as a part of the
default partitioning support.

Amit Langote has a similar patch[2] for scanning the children of a partitioned
table which is being attached as partition of another partitioned table.


Regards,
Jeevan Ladhe
Вложения

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables