mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Revert "Move PartitionPruneInfo out of plan nodes into PlannedStmt"
This reverts commitec38694894
and its fixup589bb81649
. This change was intended to support query planning avoiding acquisition of locks on partitions that were going to be pruned; however, the overall project took a different direction at [1] and this bit is no longer needed. Put things back the way they were as agreed in [2], to avoid unnecessary complexity. Discussion: [1] https://postgr.es/m/4191508.1674157166@sss.pgh.pa.us Discussion: [2] https://postgr.es/m/20230502175409.kcoirxczpdha26wt@alvherre.pgsql
This commit is contained in:
@ -134,7 +134,7 @@ ExecInitAppend(Append *node, EState *estate, int eflags)
|
||||
appendstate->as_begun = false;
|
||||
|
||||
/* If run-time partition pruning is enabled, then set that up now */
|
||||
if (node->part_prune_index >= 0)
|
||||
if (node->part_prune_info != NULL)
|
||||
{
|
||||
PartitionPruneState *prunestate;
|
||||
|
||||
@ -145,8 +145,7 @@ ExecInitAppend(Append *node, EState *estate, int eflags)
|
||||
*/
|
||||
prunestate = ExecInitPartitionPruning(&appendstate->ps,
|
||||
list_length(node->appendplans),
|
||||
node->part_prune_index,
|
||||
node->apprelids,
|
||||
node->part_prune_info,
|
||||
&validsubplans);
|
||||
appendstate->as_prune_state = prunestate;
|
||||
nplans = bms_num_members(validsubplans);
|
||||
|
Reference in New Issue
Block a user