postgresql/src/backend/partitioning
Amit Langote cbb9086c9e Fix bug in cbc127917 to handle nested Append correctly
A non-leaf partition with a subplan that is an Append node was
omitted from PlannedStmt.unprunableRelids because it was mistakenly
included in PlannerGlobal.prunableRelids due to the way
PartitionedRelPruneInfo.leafpart_rti_map[] is constructed. This
happened when a non-leaf partition used an unflattened Append or
MergeAppend.  As a result, ExecGetRangeTableRelation() reported an
error when called from CreatePartitionPruneState() to process the
partition's own PartitionPruneInfo, since it was treated as prunable
when it should not have been.

Reported-by: Alexander Lakhin <exclusion@gmail.com> (via sqlsmith)
Diagnosed-by: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Tender Wang <tndrwang@gmail.com>
Discussion: https://postgr.es/m/74839af6-aadc-4f60-ae77-ae65f94bf607@gmail.com
2025-02-25 09:24:42 +09:00
..
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
partbounds.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
partdesc.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
partprune.c Fix bug in cbc127917 to handle nested Append correctly 2025-02-25 09:24:42 +09:00