model-writtenrun 6205 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Greg Nancarrow reported that query rewriting could lose hasModifyingCTE and incorrectly permit parallel execution, and submitted a fix incorporating Tom Lane's earlier flag-copying code in #1.
- The patch in #1 propagated hasModifyingCTE and hasRecursive when merging CTE lists, rejected INSERT...SELECT rule actions that would place modifying CTEs below the top query level, and added regression coverage.
- Greg also described a previously poorly received workaround in the parallel-hazard walker; the submitted patch instead corrected the rewriter itself #1.
- Tom Lane committed the patch as 362e2dcc46 with revised comments and error wording and simpler regression-test adjustments, retaining the original implementation logic and back-patching the fix to all supported branches.
- In the final reply, Tom confirmed the push and explained that INSERT...VALUES preserved the existing test's purpose, while the expanded comment documented how the new restriction might eventually be removed; no work remained pending in this thread #2.