Re: pgsql: Don't scan partitioned tables.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Don't scan partitioned tables.
Date: 2017-03-21 14:11:34
Message-ID: CA+TgmoYzUgSd-38ysDWoDhzjm9Cc9unHaH2rPtbemPMSe2yewQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Tue, Mar 21, 2017 at 10:01 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 21 March 2017 at 13:48, Robert Haas <rhaas(at)postgresql(dot)org> wrote:
>> Don't scan partitioned tables.
>
> Sounds good.
>
>> Aside from the obvious advantage of avoiding some work at execution
>> time, this has two other advantages. First, it may improve the
>> planner's decision-making in some cases since the empty relation
>> might throw things off.
>
> I was surprised to see that an Append node still exists when there is
> only one child plan to be appended. I thought removing that was the
> whole point of the patch?

No, that was discussed on-thread.

http://postgr.es/m/b7f2d81d-9c9b-ba4e-5e00-edf626567256@lab.ntt.co.jp

It's not a bad idea, but it would require further work on top of what
this patch already does.

>> Second, it paves the way to getting rid of
>> the storage for partitioned tables altogether.
>
> I thought we already discussed that. Seems strange to mention
> something not very important that might happen in the future. We could
> save much more space by optimising FSM.

Sure, that's possible. I didn't think it was strange to mention it,
but you're welcome to have a different opinion.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2017-03-21 14:16:52 pgsql: Add a pg_recvlogical wrapper to PostgresNode
Previous Message Simon Riggs 2017-03-21 14:01:19 Re: pgsql: Don't scan partitioned tables.