model-writtenrun 7641 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Sep - Nov 2020 · 9 entries
- Greg Nancarrow proposed parallel execution of both INSERT and its underlying SELECT, building on Dilip Kumar's earlier prototype and falling back to parallel SELECT for unsupported insertion cases #1.
- Andres Freund requested a separate SELECT-only step and challenged weakened transaction checks; Greg subsequently reused existing transaction-state serialization instead of passing transaction and command IDs separately #4 #23.
- Reviews by Bharath Rupireddy, Vignesh C, and Dilip Kumar exposed target-table restrictions and unnecessary tuple-transfer costs, leading to leader-only statement triggers, special handling without RETURNING, and a separate SELECT-only patch #11 #21 #26 #34.
- Thomas Munro supplied an independent shared combo-command-ID prototype for eventual parallel UPDATE and DELETE, but that work remained separate from the INSERT series and has no landing among these candidates #42.
- Thomas extracted the incorrect ModifyTable output estimate into a standalone patch, Greg tested it, and Thomas committed it with a revised comment preserving the unresolved RETURNING-width issue #64 #66 f0f13a3a08.
- Amit Kapila explained that the leader must remain in parallel mode while workers run, so even SELECT-only parallelism needs INSERT safety checks and transaction-ID allocation before entering parallel mode #67 #69.
- Amit's partition support-function fix and broader review led Greg to restore transaction guards, allow parallel-restricted operations in the leader, and move expanded safety checks into clauses.c #73 #76.
- Greg reintegrated worker INSERT and then split the implementation into a SELECT prerequisite and an INSERT extension, while tests revealed planning overhead and difficult recursive partition-locking behavior #77 #79 #81.
- Greg temporarily withheld worker INSERT while adding SELECT tests and documentation, then restored the larger series with additional coverage; the unresolved issue was how to check every partition safely without undesirable locking behavior #85 #86.
Dec 2020 - Jan 2021 · 6 entries
- Vignesh's review made hazard checking reusable for parallel-restricted callers, and Takayuki Tsunakawa's objections led Greg to remove conditional locking and avoid unnecessary target checks for INSERT VALUES #88 #89 #96 #103.
- Hou Zhijie demonstrated that temporary targets need not prevent parallel SELECT, while Antonin Houska found an assertion that rejected nested parallel execution and verified Amit's correction #105 #107 #109 #111.
- After the December-to-January review interval, Greg consolidated assertion fixes, shared ModifyTable path construction, hazard-check integration, and transaction-ID tests into a revised series #142.
- Partition safety became a cached-plan correctness problem: Amit questioned releasing locks after checking safety, and Takayuki asked how subsequent partition changes would invalidate cached plans #125 #130 #134.
- Hou's reviews led to parallel-restricted temporary and foreign targets, more efficient index checks, allocation cleanup, and expanded tests, while Greg adjusted newly-created-relation locking and later moved Gather target-list repair into set_plan_refs() #180 #186.
- Testing exposed rewritten queries that lost hasModifyingCTE; separate investigation found the rewriter issue more complex than expected, so Greg retained a temporary workaround instead of treating the broader bug as solved #157 #190 #204.
Feb 2021 · 5 entries
- Amit Langote supplied a hazard-walker delta and demonstrated stale parallel plans after partition-trigger changes, leading to integrated target-RTE checking, partition-directory use, and dependency registration #210 #239.
- Performance testing also found that worker INSERT with bitmap scans and indexes could lose its advantage through extra B-tree splits, WAL, and contention, although parallel sequential-scan insertion still showed benefits #181 #213 #216 #222 #234.
- Greg and Amit Langote iterated on partition dependencies, first adding recursive target traversal and then moving registration from unplanned queries to planned statements, with the full series collecting OIDs during safety checking to avoid another traversal #250 #252 #254 #258.
- Amit narrowed the immediate goal to SELECT support and Hou's configuration controls, leaving actual worker INSERT for later; Hou then found missing index-predicate checks, and Amit replaced the temporary CTE workaround with direct hazard-walker detection #260 #265 #277.
- Greg integrated those fixes and Hou's configuration work into the series, then Amit Langote demonstrated a cached-plan execution race in which an unsafe partition trigger could be installed before the necessary locks were acquired #285 #286.
Mar - Apr 2021 · 13 entries
- The next full version incorporated partition locking during cached-plan execution; adding partitions to the main range table was deferred because it would require broader tuple-routing and planner changes #292 #293.
- Dilip identified remaining tuple-transfer overcharging in worker-INSERT Gather costing, and subsequent revisions also refactored safety helpers, split basic from advanced tests, and integrated domain checks into CoerceToDomain traversal #297 #299 #300 #310 #312.
- Amit prepared a smaller landing series with one partition-OID list for locking and invalidation, merged basic tests with the SELECT implementation, and omitted worker INSERT; Hou renamed the options for INSERT, and Greg applied final lock-mode corrections #314 #320 #326.
- The SELECT implementation and basic tests from Greg's final submission landed with only comment wrapping, leaving configuration and advanced tests pending #326 05c8482f7f.
- The configuration discussion settled on a default-on enable_parallel_insert GUC with a per-table parallel_insert_enabled control, and Hou posted the remaining patches with that default #335 #336.
- Tom Lane diagnosed a relcache-pointer lifetime failure and criticized special-case FK trigger checking; Greg responded with two dependent fixes, the first avoiding stale TriggerDesc pointers and landing after cache-clobber testing #337 #342 #343 e2cda3c20a.
- Greg's second attached fix moved FK check-trigger safety into pg_proc.dat and removed the planner special case, producing a separate commit #342 c5be48f092.
- Tom subsequently questioned the safety markings of other referential-integrity trigger functions, leaving an additional follow-up concern beyond that committed FK correction #347.
- Amit Langote's naming review and Amit Kapila's cosmetic edits finalized Hou's configuration patch, which landed from Amit's forwarded submission with a small regression-test change #341 #344 #349 c8f78b6161.
- Proposals to make the configuration more selective, including table-level enabling while the global switch was off, were not adopted after discussion of consistency and usability #340 #346 #350 #351.
- Justin Pryzby reported and patched documentation that incorrectly excluded the new option from partitioned tables; Amit added another wording correction and committed the combined documentation fix #353 #354 #355 ed62d3737c.
- After SELECT support and its controls had landed, Greg resubmitted the remaining worker-INSERT implementation, advanced tests, and documentation, then updated executor and locking comments following review #358 #362.
- At the thread's last message, Amit marked the remaining work Returned with Feedback because substantial work was still required, referring to further discussion on pgsql-committers #363.