Re: Dropping partitioned table drops a previously detached partition

Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>

From: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Rahila Syed <rahilasyed90@gmail.com>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-06-14T05:01:41Z
Lists: pgsql-hackers
On Tue, Jun 13, 2017 at 9:23 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Tue, Jun 13, 2017 at 9:44 AM, Rahila Syed <rahilasyed90@gmail.com> wrote:
>> I have added tests to the
>> 0001-Dependency-between-partitioned-table-and-partition_v1.patch. Please
>> find attached the v2 patch.
>
> Thanks.  Committed.

Thanks.

> I don't think the 0002 patch is an improvement -
> sure, it keeps those things in sync, but it also makes the code harder
> to read.  On balance I think it's a negative.
>

I don't think the code is hard to read, but I agree that the macro
name TABLE_COMPOSITE_TYPE_DEPENDENCY isn't conveying the real sense.
But that's not a topic for this thread. I will start a separate a
thread.

-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company


Commits

  1. Fix failure to remove dependencies when a partition is detached.