From: Tom Lane <tgl@sss.pgh.pa.us>
To: dwilches@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15873: Attaching a partition fails because it sees deleted columns
Date: Tue, 25 Jun 2019 17:49:56 -0400
Message-ID: <28917.1561499396@sss.pgh.pa.us> (raw)
In-Reply-To: <15873-8c61945d6b3ef87c@postgresql.org>
References: <15873-8c61945d6b3ef87c@postgresql.org>
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');
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, dwilches@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15873: Attaching a partition fails because it sees deleted columns
In-Reply-To: <28917.1561499396@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox