model-writtenrun 8253 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Dilip Kumar opened the thread with a proof of concept allowing parallel scans beneath INSERT INTO SELECT, reporting execution time falling from about 278 ms to 110 ms after relaxing planner and transaction-ID checks #1.
- Amit Kapila proposed extending parallelism to the inserts themselves because PostgreSQL 13 had lifted relevant group-locking restrictions, and Dilip supported extending this to CREATE TABLE AS as well #2 #3.
- Robert Haas pointed to the safety comment in heap_prepare_insert(); Amit identified it as outdated and submitted a separate patch correcting that comment and the one in heap_inplace_update() #5 #6 #7.
- Dilip approved the comment patch, while Robert questioned why the error check should remain if inserts were safe; Amit explained that foreign-key checks can generate new CommandIds and also raised possible tuple-locking concerns #8 #9 #10.
- Robert requested more precise safety explanations and Tom Lane identified nonbreaking spaces, leading Amit to post revised comments describing CommandId and tuple-locking restrictions with the unwanted whitespace removed #12 #13 #15 #16.
- Robert rejected the revised explanation that planner limitations justified the safety check and challenged the tuple-locking caveat; Amit proposed replacement wording focused on worker safety and then concluded that the tuple-locking warning could be omitted #18 #19 #20.
- Bharath Rupireddy raised page-lock contention and suggested batched inserts; Amit outlined placing INSERT below Gather and argued that contention should be measured before introducing separate worker pages or other optimizations #21 #22.
- Amit committed the comment cleanup as 0d32511eca, derived from #16 with the later wording corrections, and announced the push in the final message #24; the original parallel INSERT proof of concept remained uncommitted in this thread.