Re: Add pg_partition_root to get top-most parent of a partition tree

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Add pg_partition_root to get top-most parent of a partition tree
Дата
Msg-id 20181212014825.GF17695@paquier.xyz
обсуждение исходный текст
Ответ на Re: Add pg_partition_root to get top-most parent of a partition tree  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Add pg_partition_root to get top-most parent of a partition tree  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
On Fri, Dec 07, 2018 at 11:46:05AM +0900, Michael Paquier wrote:
> On Thu, Dec 06, 2018 at 10:48:59PM -0300, Alvaro Herrera wrote:
>> I think adding a pg_partition_root() call to as many pg_partition_tree
>> tests as you modified is overkill ... OTOH I'd have one test that
>> invokes pg_partition_tree(pg_partition_root(some-partition)) to verify
>> that starting from any point in the tree you get the whole tree.
>
> Good idea, thanks for the input.

The recent commit cc53123 has fixed a couple of issues with
pg_partition_tree, so attached is a rebased patch which similarly makes
pg_partition_root return NULL for unsupported relkinds and undefined
relations.  I have also simplified the tests based on Alvaro's
suggestion to use pg_partition_tree(pg_partition_root(partfoo)).

Thanks,
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pg_partition_tree crashes for a non-defined relation
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Sketch of a fix for that truncation data corruption issue