Re: [HACKERS] dropping partitioned tables without CASCADE - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: [HACKERS] dropping partitioned tables without CASCADE
Date
Msg-id CAFjFpReeVSqWkbONi9MHwfXa_V00FqBvMp52U60We6DhtOpQeQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] dropping partitioned tables without CASCADE  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: [HACKERS] dropping partitioned tables without CASCADE
List pgsql-hackers
Looks good to me. In the attached patch I have added a comment
explaining the reason to make partition tables "Auto" dependent upon
the corresponding partitioned tables.

In the tests we are firing commands to drop partitioned table, but are
not checking whether those tables or the partitions are getting
dropped or not. Except for drop_if_exists.sql, I did not find that we
really check this. Should we try a query on pg_class to ensure that
the tables get really dropped?

On Wed, Feb 22, 2017 at 7:26 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> On 2017/02/22 10:49, Amit Langote wrote:
>> On 2017/02/21 20:17, Ashutosh Bapat wrote:
>>> Are you sure you have attached the right patch?
>>
>> Oops, really fixed this time.
>
> Sorry again, 3rd time's a charm.  I copy-paste the hunk below from the
> patch file before I attach it to make sure:
>
> -       recordDependencyOn(&childobject, &parentobject, DEPENDENCY_NORMAL);
> +       if (child_is_partition)
> +               recordDependencyOn(&childobject, &parentobject, DEPENDENCY_AUTO);
> +       else
> +               recordDependencyOn(&childobject, &parentobject, DEPENDENCY_NORMAL);
>
> Thanks,
> Amit



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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] foreign partition DDL regression tests
Next
From: Rafia Sabih
Date:
Subject: [HACKERS] Enabling parallelism for queries coming from SQL or other PL functions