Re: [BUG] Partition creation fails after dropping a column andadding a partial index

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [BUG] Partition creation fails after dropping a column andadding a partial index
Дата
Msg-id 20191029041658.GF3476@paquier.xyz
обсуждение исходный текст
Ответ на [BUG] Partition creation fails after dropping a column and adding apartial index  (Wyatt Alt <wyatt.alt@gmail.com>)
Ответы Re: [BUG] Partition creation fails after dropping a column andadding a partial index
Список pgsql-hackers
On Mon, Oct 28, 2019 at 09:00:24PM -0700, Wyatt Alt wrote:
> I think this demonstrates a bug, tested in 11.5:
> https://gist.github.com/wkalt/a298fe82c564668c803b3537561e67a0

If this source goes away, then we would lose it.  It is always better
to copy directly the example in the message sent to the mailing lists,
and here it is:
create table demo (
  id int,
  useless int,
  d timestamp,
  b boolean
) partition by range (id, d);
alter table demo drop column useless;
-- only seems to cause failure when it's a partial index on b.
create index on demo(b) where b = 't';
create table demo_1_20191031 partition of demo for values from (1,
'2019-10-31') to (1, '2019-11-01');

> The same script succeeds if the index on line 11 is either dropped, made to
> be non-partial on b, or shifted to a different column (the others are used
> in the partitioning; maybe significant).
>
> This seems somewhat related to
>
https://www.postgresql.org/message-id/flat/CAFjFpRc0hqO5hc-%3DFNePygo9j8WTtOvvmysesnN8bfkp3vxHPQ%40mail.gmail.com#00ca695e6c71834622a6e42323f5558a

Yes, something looks wrong with that.  I have not looked at it in
details yet though.  I'll see about that tomorrow.
--
Michael

Вложения

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

Предыдущее
От: Wyatt Alt
Дата:
Сообщение: Re: [BUG] Partition creation fails after dropping a column and addinga partial index
Следующее
От: btfujiitkp
Дата:
Сообщение: Re: Should we add xid_current() or a int8->xid cast?