Re: partitionning

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Mike Rylander <mrylander(at)gmail(dot)com>, Christian Kratzer <ck(at)cksoft(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: partitionning
Date: 2005-03-13 04:35:51
Message-ID: 13974.1110688551@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> Note, the planner does have most of the intelligence needed to
> determine when it can skip a partition.

The issue isn't really whether the planner *could* use a constraint
to decide that a table need not be scanned at all. As you say, we
have practically all the infrastructure needed for such inferences.
To me the real reason why we don't do that is the lack of a mechanism
to force the plan to be reconsidered if the constraint is dropped.
Without the constraint, the plan will still run, but it may deliver
wrong answers. (The closest current equivalent is the possibility of
dropping an index that a plan depends on --- but at least we will fail
outright if the index isn't there anymore.)

In short, I won't accept any such patch until after we build a mechanism
for invalidating cached plans. Which we need anyway for other reasons.
So the path ahead is clear, in my mind anyway ... but this is not the
next step to take.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Mayer 2005-03-13 05:40:10 Re: [PATCHES] A way to let Vacuum warn if FSM settings are low. [final?]
Previous Message Bruno Wolff III 2005-03-13 03:59:58 Re: Using sequence name depending on other column