Re: FailedAssertion on partprune
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jaime Casanova <jaime.casanova@2ndquadrant.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-07-24T14:14:34Z
Lists: pgsql-hackers
On 25 July 2018 at 01:46, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Hm, wouldn't this be fixed by your pending patch at > <CAKJS1f_eYwHk2x0xX7qW42rV_GRsJGBMe3AqN9MYLRSs1S+CiA@mail.gmail.com> > ? It's a different issue. I coded run-time pruning with the incorrect assumption that we only get leaf partitions under an Append which have a non-empty partitioned_rels List. The other patch fixes it to supported mixed hierarchies from UNION ALLs. It'll still trip up on anything apart from leaf partitions being in the subpaths list. Thinking again about the patch I submitted upthread; I wonder if it's actually possible to support pruning with Jamie's query. Without looking at the code, I don't quite see the reason that the sub-partitioned table wouldn't be correctly pruned by the run-time pruning code. It could just be a matter of removing the failing Assert(). I'll do a bit more testing and confirm. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Remove bogus Assert in make_partitionedrel_pruneinfo().
- 69d0e7e6b81d 11.0 landed
- 59ef49d26d2f 12.0 landed
-
LLVMJIT: Adapt to API changes in gdb and perf support.
- 1b957e59b92d 11.0 cited
-
Rewrite the code that applies scan/join targets to paths.
- 11cf92f6e2e1 11.0 cited