Re: generic plans and "initial" pruning
Amit Langote <amitlangote09@gmail.com>
On Wed, Feb 12, 2025 at 8:53 PM Amit Langote <amitlangote09@gmail.com> wrote: > On Thu, Feb 6, 2025 at 11:35 AM Amit Langote <amitlangote09@gmail.com> wrote: > > Per cfbot-ci, the new test case output in 0002 needed to be updated. > > > > I plan to push 0001 tomorrow, barring any objections. > > I pushed that last Friday. With bb3ec16e, d47cbf47, and cbc12791 now in: > > * Pruning information is now stored separately from parent plan nodes > in PlannedStmt. > > * Initial runtime pruning occurs as a separate step, independent of > and before plan initialization in InitPlan(). > > * The RT indexes of unprunable relations and those of partitions that > survive initial pruning are stored in a global bitmapset in EState, > allowing us to avoid work that was previously done for pruned > partitions. This was difficult before because initial pruning wasn’t > performed before the parent plan node was initialized, meaning that > the work we aimed to save had already been done. > > The final remaining piece is to skip taking locks on partitions pruned > during initial pruning, and the attached patch addresses that. > > I’d like to commit the patch next week, barring objections. I pushed the final piece yesterday. Thank you all who have commented on this thread, reviewed the patches in its various incarnations, and offered advice here or offlist. -- Thanks, Amit Langote
Commits
-
Stamp 19beta1.
- 4b0bf0788b06 19 (unreleased) cited
-
Revert "Don't lock partitions pruned by initial pruning"
- 1722d5eb05d8 18.0 landed
-
Ensure first ModifyTable rel initialized if all are pruned
- 28317de723b6 18.0 cited
-
Fix bug in cbc127917 to handle nested Append correctly
- cbb9086c9ef6 18.0 landed
-
Remove unstable test suite added by 525392d57
- 4f1b6e5bb4fe 18.0 landed
-
Don't lock partitions pruned by initial pruning
- 525392d5727f 18.0 landed
-
Fix an oversight in cbc127917 to handle MERGE correctly
- 75dfde13639a 18.0 landed
-
Track unpruned relids to avoid processing pruned relations
- cbc127917e04 18.0 landed
-
Perform runtime initial pruning outside ExecInitNode()
- d47cbf474ecb 18.0 landed
-
Move PartitionPruneInfo out of plan nodes into PlannedStmt
- bb3ec16e14de 18.0 landed
-
Fix setrefs.c's failure to do expression processing on prune steps.
- bf826ea06297 18.0 cited
-
Remove obsolete executor cleanup code
- d060e921ea5a 17.0 landed
-
Revert "Move PartitionPruneInfo out of plan nodes into PlannedStmt"
- 5472743d9e85 16.0 landed
-
Move PartitioPruneInfo out of plan nodes into PlannedStmt
- ec386948948c 16.0 landed
-
Refactor and cleanup runtime partition prune code a little
- 297daa9d4353 15.0 landed
-
Remove some unnecessary fields from Plan trees.
- 52ed730d511b 12.0 cited
-
Remove more redundant relation locking during executor startup.
- f2343653f5b2 12.0 cited
-
Shut down Gather's children before shutting down Gather itself.
- acf555bc53ac 10.0 cited