git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 48796a9) | patch
Fix bug in cbc127917 to handle nested Append correctly
2025年2月25日 00:21:17 +0000 (09:21 +0900)
2025年2月25日 00:24:42 +0000 (09:24 +0900)
commit cbb9086c9ef64b020cb9036f50afc14644bbf734
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
src/backend/executor/execPartition.c diff | blob | blame | history
src/backend/partitioning/partprune.c diff | blob | blame | history
src/test/regress/expected/partition_prune.out diff | blob | blame | history
src/test/regress/sql/partition_prune.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /