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...@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
0001-Allow-dropping-partitioned-table-without-CASCADE_v2.patch
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers