]> 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:49:39 +0000 (12:49 -0300)
commit6589a435d83ba0b22cb56381fc5b410eb0e27834
tree220beb7632a4f4bfacf3066e2c04889164717137
parent43ba5ac6aa4879eea2d16f7f531b256c8203a3c3
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