Re: Partitioning option for COPY

Поиск
Список
Период
Сортировка
От Emmanuel Cecchet
Тема Re: Partitioning option for COPY
Дата
Msg-id 4B0BF6F1.8050300@asterdata.com
обсуждение исходный текст
Ответ на Re: Partitioning option for COPY  (Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Ответы Re: Partitioning option for COPY
Re: Partitioning option for COPY
Список pgsql-hackers
Itagaki Takahiro wrote:
> I just edited a wiki page for this discussion.
> I hope it can be a help.
> http://wiki.postgresql.org/wiki/Table_partitioning
>   
I guess the problem of handling user triggers is still open.
If we allow triggers on partitions, badly written logic could lead to 
infinite loops in routing. In the case of COPY, an after statement 
trigger could change all the routing decisions taken for each row. I am 
not sure what the semantic should be if you have triggers defined on the 
parent and child tables. Which triggers do you fire if the insert is on 
the parent table but the tuple ends up in a child table?
If the new implementation hides the child tables, it might be safer to 
not allow triggers on child tables altogether and use the parent table 
as the single point of entry to access the partition (and define 
triggers). With the current proposed implementation, would it be 
possible to define a view using child tables?

Emmanuel

-- 
Emmanuel Cecchet
Aster Data
Web: http://www.asterdata.com



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: [INTERFACES] ecpg & 8.3 -> 8.4 migration