Re: [HACKERS] dropping partitioned tables without CASCADE

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема Re: [HACKERS] dropping partitioned tables without CASCADE
Дата
Msg-id CAFjFpReeVSqWkbONi9MHwfXa_V00FqBvMp52U60We6DhtOpQeQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] dropping partitioned tables without CASCADE  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: [HACKERS] dropping partitioned tables without CASCADE  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список 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

Вложения

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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [HACKERS] foreign partition DDL regression tests
Следующее
От: Rafia Sabih
Дата:
Сообщение: [HACKERS] Enabling parallelism for queries coming from SQL or other PL functions