Re: Partitioning option for COPY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Emmanuel Cecchet <manu(at)asterdata(dot)com>, Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, 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-23 17:18:56
Message-ID: 18802.1258996736@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> Anyway, I want data routing, as is the intention of this patch. I just
> don't think this patch is a useful way to do it. It is too narrow in its
> scope and potentially buggy in its approach to developing a cache and
> using trigger-like stuff.

FWIW, I agree --- there are two really fundamental problems with this
patch:

* It only applies to COPY. You'd certainly want routing for INSERT as
well. And it shouldn't be necessary to specify an option.

* Building this type of infrastructure on top of independent, not
guaranteed consistent table constraints is just throwing more work
into a dead end. The patch is already full of special-case errors
for possible inconsistency of the constraints, and I don't think it's
bulletproof even so (what if someone is altering the constraints
concurrently? What if there's more than one legal destination?)
And the performance necessarily sucks.

What we need first is an explicit representation of partitioning, and
then to build routing code on top of that. I haven't looked at
Itagaki-san's syntax patch at all, but I think it's at least starting
in a sensible place.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2009-11-23 17:23:21 Re: Partitioning option for COPY
Previous Message Greg Stark 2009-11-23 16:27:48 Re: point_ops for GiST