Re: BUG #16276: Server crash on an invalid attempt to attach apartition to an index

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #16276: Server crash on an invalid attempt to attach apartition to an index
Дата
Msg-id 20200227023120.GC1969@paquier.xyz
обсуждение исходный текст
Ответ на Re: BUG #16276: Server crash on an invalid attempt to attach apartition to an index  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: BUG #16276: Server crash on an invalid attempt to attach apartition to an index  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-bugs
On Wed, Feb 26, 2020 at 05:06:24PM +0900, Michael Paquier wrote:
> Attempting to attach a table to a partitioned index?  Nice thought.
> Without the assertion, RangeVarCallbackForAttachIndex complains that
> the relation is not an index, which is right, so I would be tempted to
> just remove the culprit assertion.  Any thoughts?

FWIW, one can note that ALTER TABLE ATTACH PARTITION with indexes
correctly registers partition indexes without partition bounds in
pg_class, even if the grammar cannot accept ALTER TABLE without any
bounds defined:
create table idxpart(a int) partition by list (a);
create table idxpart1 partition of idxpart for values in (1);
create index idxpart_idx on only idxpart(a);
create index idxpart1_idx on only idxpart1(a);
alter table idxpart_idx attach partition idxpart1_idx for values in (0);

So I would rather not issue an error in that case on compatibility
ground.
--
Michael

Вложения

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

Предыдущее
От: Andreas Lennartsson
Дата:
Сообщение: Re: BUG #16277: xmlelement allows invalid XML characters when XMLversion is set to 1.0
Следующее
От: Amit Langote
Дата:
Сообщение: Re: BUG #16276: Server crash on an invalid attempt to attach apartition to an index