model-writtenrun 9217 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Feb - Mar 2019 · 10 entries
- Tom Lane opened the thread with an expandable-array implementation of Lists, retaining most existing APIs while making list_nth constant-time and accepting more expensive insertion and deletion near the front; he targeted the next development cycle because stale ListCell pointers were a substantial compatibility risk #1.
- Robert Haas and Andres Freund challenged the risk of silently breaking extensions and advocated considering a separate representation or clearer API, while Tom argued that replacing the shared implementation would require far fewer changes than converting interconnected parse, plan and execution structures #3 #5 #8 #6.
- Andres suggested allocating a small initial array together with a stable List header, avoiding a second allocation for common short lists without allowing the header to move #25.
- David Rowley's initial planning benchmark showed a small regression, and his experimental offset-based storage and iteration changes mostly made matters worse; removing the unnecessary NULL check from lnext was the useful result #27 #36.
- Tom abandoned an early attempt to eliminate lnext entirely because it enlarged the patch and weakened detection of incorrect deletion loops, but extracted independent parallel-loop cleanup and last-cell-predicate proposals #29 #30.
- After David reviewed the parallel-loop changes, Tom committed that portion unchanged as c94fb8e8ac and dropped the proposed last-cell predicates because their readability benefit was unconvincing #34 #45.
- The next main revision incorporated the lnext simplification, audited deletion callers and strengthened debugging relocation, while the following revision adopted inline initial storage for short lists #46 #49.
- With the standalone performance case still uncertain, David posted a broad experimental follow-up combining fast indexed access, executor-array removal, bitmap-driven subplan initialization, permission-check changes and delayed locking; its large partitioning gains demonstrated opportunities rather than the benefit of the List rewrite alone #52.
- Andres then reported reproducible improvements and reduced allocator overhead with the inline-storage version, strengthening the case for proceeding despite less conclusive earlier benchmarks #55.
- David extracted the Append and MergeAppend optimization from his earlier experiment into a focused patch, replacing scans of every subplan with bitmap-member iteration and direct list indexing #52 #105.
May - Aug 2019 · 21 entries
- After a gap, Tom rebased the implementation and redesigned iteration to evaluate List expressions once using structure-held state; a small subsequent correction removed a CI-reported unused iterator #68 #70.
- David proposed batching deletions through a bitmap, but Tom questioned its overhead for common small deletions and treated bulk deletion as separable work #69 #71.
- Jesper Pedersen tested the patch with and without aggressive List debugging, and Tom resumed work with a July rebase before introducing foreach_delete_current and foreach_current_index to simplify deletion loops #75 #76 #78.
- David's full review and additional benchmarks led to clearer contracts, direct alias indexing, a void-returning enlarge_list and memcpy-based concatenation; he then checked the resulting final posted revision #81 #83 #86.
- Daniel Gustafsson tested the final patch after adapting a newly added lnext callsite, and Tom landed it as 1cff1b95ab, with further comments and local API cleanup #88 #89.
- The redundant memory-context switches Jesper had identified in pg_listening_channels were removed separately as 4c3d05d875, rather than being included in an attached revision of the main patch #75 #76.
- Tom proposed sorting ListCells directly in place, and David Rowley's naming suggestion changed the interface from list_qsort to list_sort before it landed as 569ed7f483; Tom also valued the rename because it made external callers notice the API break #90 #92 #98.
- The accompanying OID-list cleanup replaced ordered insertion with sorting and optional deduplication, landing from #91 as 2f5b8eb5a2 with the new sorting name.
- Tom's accompanying proposal to eliminate the remaining lappend_cell use became c245776906, which rewrote GEQO insertion around an index and removed the pointer-based insertion family without a separate posted patch #91.
- Tom split lcons and head-deletion cleanup into straightforward conversions and potentially observable ordering changes; David examined the latter function by function, while Daniel reviewed the former and its edge cases #100 #101 #102.
- Daniel also proposed using list_copy_tail in fetch_search_path, but Tom declined to pursue that extra optimization because there was no demonstrated performance problem and the existing form allowed more general list modifications #102 #104.
- Both posted lcons-cleanup patches landed unchanged together as d97b714a21, including the deliberate aggregate-evaluation ordering change; more invasive queue reversals and changes affecting index preference were left out #100.
- The buildfarm exposed another consequence of the aggregate-order change, requiring 82c8a3c52a to reorder sepgsql's expected audit-log entries after d97b714a21.
- Tom requested measurements for dense bitmaps, and David demonstrated the tradeoff between much faster sparse iteration and slower dense iteration; they judged the latter negligible beside actual subplan initialization, and the patch landed unchanged apart from comment wrapping as efdcca55a3 #106 #108 #109.
- Tom separately introduced list_concat_copy and removed unnecessary copies at concatenation sites; David found one FDW call that could use ordinary list_concat, while broader proposals for more variants or flag-driven APIs did not gain agreement #107 #112 #113 #114 #115.
- Discussion of narrower iterator-variable scope led Tom to prototype anonymous aforeach macros and convert parse_clause.c as a demonstration, but the supplied thread records no landing for that experiment #116 #121 #128.
- Tom attempted to remove the planner's simple_rte_array but found no speedup, possible slowdowns from added indirection and a corner-case assumption about array bounds; he retained the array and committed only initialization consolidation and comment improvements as 1661a40505 #129.
- Tom then posted a focused removal of the executor's es_range_table_array, while explaining that partition locking and permission checks still dominated startup time; Alvaro Herrera and David argued that eliminating a redundant representation was worthwhile even without a measured speedup #132 #133 #134.
- The concatenation cleanup finally landed from #107 with David's FDW correction as 5ee190f8ec; Tom left automatic freeing of the second input unimplemented #130 #135.
- The executor-array removal landed exactly as posted in #132 as 3c926587b5, and Tom noted possible future trigger-path optimizations without undertaking them #136.
- At the thread's end, the main rewrite and the identified follow-ups had landed, the planner-array removal had been rejected, and the anonymous-iteration experiment remained unlanded; a later message proposed variadic list_make macros inline, with no subsequent review or landing shown #129 #128 #137.