pgsql: Fix executor prune failure when plan already pruned

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Fix executor prune failure when plan already pruned
Дата
Msg-id E1fqKhp-0001JZ-04@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6589a435d83ba0b22cb56381fc5b410eb0e27834

Modified Files
--------------
src/backend/executor/execPartition.c          |  9 +++++++--
src/test/regress/expected/partition_prune.out | 18 ++++++++++++++++++
src/test/regress/sql/partition_prune.sql      | 12 ++++++++++++
3 files changed, 37 insertions(+), 2 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: pgsql: Close the file descriptor in ApplyLogicalMappingFile
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Require a C99-compliant snprintf(),and remove related workaroun