Re: Declarative partitioning - another take

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Declarative partitioning - another take
Дата
Msg-id CA+TgmoZLTQGMW80CLEkPRFh53vWr=K569zMzfHe7Vw3q6UDdKg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Declarative partitioning - another take  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
On Wed, Nov 2, 2016 at 6:47 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> OK, I changed things so that DROP TABLE a_partition no longer complains
> about requiring to detach first.  Much like how index_drop() locks the
> parent table ('parent' in a different sense, of course) and later
> invalidates its relcache, heap_drop_with_catalog(), if the passed in relid
> is a partition, locks the parent table using AccessExclusiveLock, performs
> its usual business, and finally invalidates the parent's relcache before
> closing it without relinquishing the lock.  Does that sounds sane?

Yes.

> One
> downside is that if the specified command is DROP TABLE parent CASCADE,
> the above described invalidation is a waste of cycles because the parent
> will be dropped anyway after all the partitions are dropped.

I don't think that's even slightly worth worrying about.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Complete LOCK TABLE ... IN ACCESS|ROW|SHARE
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Declarative partitioning - another take