model-writtenrun 4412 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Justin Pryzby reported a sqlsmith-derived query that failed under forced parallel execution with an uninitialized initplan error in #1.
- Tom Lane traced the failure to moving initplans onto a child without clearing its parallel_safe flag and supplied both a minimal fix and an alternative that also transferred initplan costs in #2; he favored omitting a fragile regression test and deferred relaxing the general restriction on parallel-safe initplans.
- Richard Guo endorsed the cost-aware alternative in #3 and asked whether SS_attach_initplans needed parallel-safety handling and whether a parallel-safe top plan could legitimately have initplans to move onto a Gather.
- Tom explained that SS_attach_initplans relies on earlier cost and safety accounting, accepted clearer comments and a Gather assertion, and proposed restricting cost corrections to HEAD while using the minimal fix on stable branches in #4.
- The supplied branch variants 60c8aeaf67 and 88ceac5d77 landed the safety-only fix from #2 with branch-specific adaptation, the Gather assertion, and comment improvements; neither includes cost corrections or a new regression test.
- David Rowley endorsed the minimal fix for stable branches in #5, after both commits had landed; the reported safety bug was fixed, while cost corrections and broader parallel-initplan support remained separate follow-up work.