Fix executor prune failure when plan already pruned
Alvaro Herrera <alvherre@alvh.no-ip.org>
Fix executor prune failure when plan already pruned In a multi-layer partitioning setup, if at plan time all the sub-partitions are pruned but the intermediate one remains, the executor later throws a spurious error that there's nothing to prune. That is correct, but there's no reason to throw an error. Therefore, don't. Reported-by: Andreas Seltenreich <seltenreich@gmx.de> Author: David Rowley <david.rowley@2ndquadrant.com> Discussion: https://postgr.es/m/87in4h98i0.fsf@ansel.ydns.eu
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/execPartition.c | modified | +7 −2 |
| src/test/regress/expected/partition_prune.out | modified | +18 −0 |
| src/test/regress/sql/partition_prune.sql | modified | +12 −0 |
Discussion
- [sqlsmith] ERROR: partition missing from subplans 5 messages · 2018-08-10 → 2018-08-19