Re: Internal error XX000 with enable_partition_pruning=on, pg 11beta1 on Debian - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Internal error XX000 with enable_partition_pruning=on, pg 11beta1 on Debian
Date
Msg-id CA+TgmoZRRHkCHTW3+ydZePk-GtnrX7TqtXZPAw4F4Hu26bb6wg@mail.gmail.com
Whole thread Raw
In response to Re: Internal error XX000 with enable_partition_pruning=on, pg 11beta1 on Debian  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: Internal error XX000 with enable_partition_pruning=on, pg 11beta1 on Debian
List pgsql-hackers
On Sun, Jun 17, 2018 at 10:59 PM, David Rowley
<david.rowley@2ndquadrant.com> wrote:
> Thanks for looking.
>
> Robert, do you have any objections to the proposed patch?

I don't have time to study this right now, but I think the main
possible objection is around performance.  If not flattening the
Append is the best way to make queries run fast, then we should do it
that way.  If making pruning capable of coping with mixed hierarchies
is going to be faster, then we should do that.  If I were to speculate
in the absence of data, my guess would be that failing to flatten the
hierarchy is going to lead to a significant per-tuple cost, while the
cost of making run-time pruning smarter is likely to be incurred once
per rescan (i.e. a lot less).  But that might be wrong, and it might
be impractical to get this working perfectly in v11 given the time we
have.  But I would suggest that you performance test a query that ends
up feeding lots of tuples through two Append nodes rather than one and
see how much it hurts.

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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: server crashed with TRAP: FailedAssertion("!(!parallel_aware || pathnode->path.parallel_safe)"
Next
From: Robert Haas
Date:
Subject: Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows