Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index

Поиск
Список
Период
Сортировка
От Alexander Lakhin
Тема Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index
Дата
Msg-id 14987634-43c0-0cb3-e075-94d423607e08@gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: BUG #17997: Assert failed in validatePartitionedIndex() when attaching partition index to child of valid index  (Alexander Lakhin <exclusion@gmail.com>)
Список pgsql-bugs
26.06.2023 11:05, Michael Paquier wrote:
> A third solution that came into my mind just now would be to revisit
> the choice done in AttachPartitionEnsureIndexes() where an invalid
> index can be chosen as a match when creating the indexes on the
> partitions, so as we are able to get to the bottom of a chain with
> valid indexes for the whole tree.  I have been testing the attached
> and it has been working here the way I'd expect when manipulating
> partition trees with ATTACH PARTITION, though this breaks the scenario
> of this bug report because we would now get a failure when attempting
> to attach an index in the last command.

Thanks for the fix!

This solution seems sensible to me. The only downside I see is that an
invalid index would be left orphaned after ATTACH PARTITION, but I couldn't
find in doc/ or src/test/regress/ any promises that such index must be
used. I also don't see a way to make a previously valid index inside the
partition index tree invalid and available to attaching a child index to it
in the same time.

Beside that, maybe it would be better to place the test for the fix in
indexing.sql, where many similar operations with partitioned indexes are
performed.

Best regards,
Alexander



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #18000: Access method used by matview can be dropped leaving broken matview
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18002: Duplicate entries of row possible even after having primary key