From: | Emmanuel Cecchet <manu(at)asterdata(dot)com> |
---|---|
To: | Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
Cc: | Emmanuel Cecchet <Emmanuel(dot)Cecchet(at)asterdata(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Partitioning option for COPY |
Date: | 2009-11-12 00:53:58 |
Message-ID: | 4AFB5CA6.80704@asterdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
>> I have extracted the partitioning option for COPY (removed the error
>> logging part) from the previous patch.
>>
>
> We can use an INSERT trigger to route tuples into partitions even now.
> Why do you need an additional router for COPY?
Tom has already explained on the list why using a trigger was a bad idea
(and I know we can use a trigger since I am the one who wrote it).
If you look at the code you will see that you can do optimizations in
the COPY code that you cannot do in the trigger.
> Also, it would be nicer
> that the router can works not only in COPY but also in INSERT.
>
As 8.5 will at best provide a syntactic hack on top of the existing
constraint implementation, I think that it will not hurt to have routing
in COPY since we will not have it anywhere otherwise.
> BTW, I'm working on meta data of partitioning now. Your "partitioning"
> option in COPY could be replaced with the catalog.
>
This implementation is only for the current 8.5 and it will not be
needed anymore once we get a fully functional partitioning in Postgres
which seems to be for a future version.
Best regards,
Emmanuel
--
Emmanuel Cecchet
Aster Data
Web: http://www.asterdata.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-11-12 01:03:30 | Re: Listen / Notify rewrite |
Previous Message | Tom Lane | 2009-11-12 00:45:33 | Re: not logging caught exceptions |