-
Notifications
You must be signed in to change notification settings - Fork 1
Description
--- As of 2026-02-11T04:05:50.000Z ---
Amit Langote posted v5 of a patch series addressing partition pruning in PostgreSQL's generic cached plans. The series introduces ExecutorPrep(), which extracts permission checks, range table initialization, and initial partition pruning from InitPlan() into a separate callable helper. This enables pruning-aware locking in GetCachedPlan(), where only surviving partitions are locked rather than all child partitions. Key changes from v4 include removing the ExecPrep struct, moving PARAM_EXEC setup, and adding comprehensive tests. The approach involves running pruning during plan cache validation rather than execution, raising concerns about snapshot semantics and EState memory lifetime management. The series includes six patches covering refactoring, ExecutorPrep introduction, testing, pruning-aware locking, SQL function support, and parallel worker optimization. Amit seeks review particularly on executor lifecycle and plan cache internals.
Amit Langote发布了解决PostgreSQL通用缓存计划中分区修剪问题的v5补丁系列。该系列引入了ExecutorPrep(),将权限检查、范围表初始化和初始分区修剪从InitPlan()中提取到一个独立的可调用助手函数中。这使得GetCachedPlan()中的修剪感知锁定成为可能,只锁定存活的分区而不是所有子分区。与v4相比的关键变更包括移除ExecPrep结构体、移动PARAM_EXEC设置以及添加全面测试。该方法涉及在计划缓存验证期间而非执行期间运行修剪,这引发了对快照语义和EState内存生命周期管理的担忧。该系列包含六个补丁,涵盖重构、ExecutorPrep引入、测试、修剪感知锁定、SQL函数支持和并行工作进程优化。Amit寻求特别是在执行器生命周期和计划缓存内部机制方面的审查。
participants - 参与者: