Re: FOR EACH ROW triggers on partitioned tables

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: FOR EACH ROW triggers on partitioned tables
Дата
Msg-id CA+TgmoZtBLCd1TebU0W-WS0yYvjJXNtpS9ETKQ0w8UEYOKSAwQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: FOR EACH ROW triggers on partitioned tables  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: FOR EACH ROW triggers on partitioned tables
Список pgsql-hackers
On Tue, Jan 23, 2018 at 5:10 PM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> The main question is this: when running the trigger function, it is
> going to look as it is running in the context of the partition, not in
> the context of the parent partitioned table (TG_RELNAME etc).  That
> seems mildly ugly: some users may be expecting that the partitioning
> stuff is invisible to the rest of the system, so if you have triggers on
> a regular table and later on decide to partition that table, the
> behavior of triggers will change, which is maybe unexpected.  Maybe this
> is not really a problem, but I'm not sure and would like further
> opinions.

It doesn't seem either great or horrible.

Also, what about logical replication?  Amit just raised this issue for
the UPDATE row movement patch, and it seems like the issues are
similar here.  If somebody's counting on the same kinds of per-row
triggers to fire during logical replication as we do during the
original operation, they will be disappointed.

>> Also, does ALTER TABLE ... ENABLE/DISABLE TRIGGER do the right things on
>> partitioned tables?
>
> Haven't done this yet, either.  I like Simon's suggestion of outright
> disallowing this.

Why not just make it work?

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


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Would a BGW need shmem_access or database_connection toenumerate databases?
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump