Re: BUG #15873: Attaching a partition fails because it sees deleted columns

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #15873: Attaching a partition fails because it sees deleted columns
Дата
Msg-id 28917.1561499396@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #15873: Attaching a partition fails because it sees deleted columns  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #15873: Attaching a partition fails because it sees deleted columns  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> Bug reference:      15873
> PostgreSQL version: 11.2

> I'm trying to attach a partition to one of my partitioned tables and I'm
> getting an error:
>     ERROR:  42703: attribute 4 of type my_table_000000_partition has been
> dropped

FWIW, I tried to reproduce this using the attached example.  Works
fine here.  However, this report sounds quite a lot like some partitioning
bugs that have been fixed in the past.  Could you update to 11.4 and try
again?  If it still fails, then there's some aspect of your problem table
that you have not told us about.

            regards, tom lane


drop table if exists pparent;

create table pparent(f1 int, z int, f2 int, my_timestamp timestamptz, f3 int)
partition by range (my_timestamp);

alter table pparent drop column z;

create table defchild (f1 int, f2 int,
bogus1 text, my_timestamp timestamptz, bogus2 text, f3 int);

alter table defchild drop column bogus1, drop column bogus2;

alter table pparent attach partition defchild default;

create table otherchild (like defchild including all);

alter table pparent attach partition otherchild
  for values from ('2019-01-01') to ('2020-01-01');



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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #15873: Attaching a partition fails because it sees deleted columns
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15789: libpq compilation with OpenSSL 1.1.1b fails onWindows with Visual Studio 2017