Re: strange thing with partitioning / rules / plpgsql

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: strange thing with partitioning / rules / plpgsql
Дата
Msg-id 20070129155747.GK14134@alvh.no-ip.org
обсуждение исходный текст
Ответ на strange thing with partitioning / rules / plpgsql  (Tomas Vondra <tv@fuzzy.cz>)
Список 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.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Limit on number of users in postgresql?
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Load balancing across disks