]> granicus.if.org Git - postgresql/commit
Fix executor prune failure when plan already pruned
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 16 Aug 2018 15:43:04 +0000 (12:43 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 16 Aug 2018 15:53:43 +0000 (12:53 -0300)
commit1eb9221585c25cad1a563bc3414f697dae3fbc8b
treea50d44ced642627e8c8c936c254d88acab732157
parentfa73b377ee11ced0c051fb42c29a87b5c71b79e3
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
src/backend/executor/execPartition.c
src/test/regress/expected/partition_prune.out
src/test/regress/sql/partition_prune.sql