Re: Internal error XX000 with enable_partition_pruning=on, pg 11 beta1 on Debian
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Phil Florent <philflorent@hotmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-06-10T13:16:23Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Match RelOptInfos by relids not pointer equality.
- a3deecb1c9af 11.0 landed
- 11e22e486d8d 12.0 landed
-
Fix run-time partition pruning for appends with multiple source rels.
- 1b54e91faabf 11.0 landed
- 1c2cb2744bf3 12.0 landed
On 10 June 2018 at 04:48, Tom Lane <tgl@sss.pgh.pa.us> wrote: > So, IIUC, the issue is that for partitioning cases Append expects *all* > its children to be partitions of the *same* partitioned table? That > is, you could also break it with > > select * from partitioned_table_a > union all > select * from partitioned_table_b > > ? Not quite. I think what I sent above is the most simple way to break it. Your case won't because there are no quals to prune with, so run-time pruning is never attempted. > If so, maybe the best solution is to not allow a partitioning appendrel > to be flattened into an appendrel generated in other ways (particularly, > via UNION ALL). I also wonder whether it was a bad idea to treat these > as the same kind of path/plan in the first place. That might be the best idea. I'll look into that now. The only drawback I see is that we'll end up pulling tuples through more Append nodes in cases like you mentioned above. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services