From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tomas Vondra <tv(at)fuzzy(dot)cz> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: strange thing with partitioning / rules / plpgsql |
Date: | 2007-01-29 15:57:47 |
Message-ID: | 20070129155747.GK14134@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tomas Vondra wrote:
> So far everything seems ok, but let's create another child table
>
[...]
> ======================================================================
>
> and do the execution plan again:
>
> ======================================================================
>
> EXPLAIN EXECUTE tmp;
>
> ------------------------------------------------------------------------
> Aggregate (cost=73.50..73.51 rows=1 width=4)
> -> Append (cost=0.00..62.80 rows=4280 width=4)
> -> Seq Scan on parent (cost=0.00..31.40 rows=2140 width=4)
> -> Seq Scan on child_0 parent (cost=0.00..31.40 rows=2140 width=4)
>
> ======================================================================
>
> Ooops, the new child table is missing ;(
Yes, this is a known defect of the partitioning code, and it's one of
(probably the most powerful) reason why it's not enabled by default.
With PL/pgSQL functions you don't have to destroy and recreate the
function -- just close the connection and reconnect.
It's not fixed in 8.2. There's been a lot of noise about fixing this
for 8.3 (look for "plan invalidation"), but it's not done yet.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2007-01-29 16:17:19 | Re: Load balancing across disks |
Previous Message | Tom Lane | 2007-01-29 15:51:03 | Re: Limit on number of users in postgresql? |