model-writtenrun 1393 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Feb - Apr 2019 · 8 entries
- Takayuki Tsunakawa proposed maintaining a list of acquired LOCALLOCK objects so transaction completion would avoid scanning a hash table permanently enlarged by an earlier transaction, particularly after generic planning touched many partitions #1.
- Tom Lane objected to keeping a backend-local list head in shared PGPROC memory and to enlarging LOCALLOCK, while Andres Freund identified removable structure padding; Tsunakawa moved the list head into lock.c and incorporated the packing change #2 #10 #13 #19.
- Peter Eisentraut requested separate structure-packing and scan-optimization patches plus clearer documentation, and Tsunakawa supplied and rebased that split #20 #21 #23.
- Peter Eisentraut committed the unchanged structure-packing portion of #23 as 28988a84cf, saving eight bytes per LOCALLOCK on x86-64 while leaving the scan optimization for further performance evaluation #24.
- Initial performance results were disputed, but David Rowley's mixed workload and subsequent partitioning tests from Amit Langote and Yoshikazu Imai demonstrated the cost of retaining a bloated local-lock hash table #25 #30 #37 #40.
- Tom Lane measured a substantial improvement with thousands of partitions but remained concerned about ordinary-workload overhead and LOCALLOCK growth, preferring a broader hash-iteration solution; Andres Freund and Tom explored compact storage and array scans as alternatives #42 #43 #44.
- David Rowley implemented a replacement approach that rebuilt oversized local-lock hash tables, then followed Tom Lane's review by dropping survivor copying and statistics and rebuilding only empty tables through an explicit bucket-count API #46 #47 #53 #57.
- Tsunakawa accepted the simpler shrinking approach, and the June revisions added a separate shrink threshold and incorporated his naming and cleanup suggestions #62 #64 #65 #66.
Jun - Sep 2019 · 4 entries
- Further benchmarks exposed a roughly seven-percent regression when repeated queries forced repeated rebuilding, so Rowley delayed shrinking until 1,000 qualifying calls; Tsunakawa questioned the resulting changes in query latency #69 #70.
- Tom Lane rejected the fixed delay because it ignored workload history, prompting Rowley to replace it with a moving-average threshold and then remove the demonstration logging #80 #82 #83.
- The adaptive approach stalled when Tom Lane noted that transaction-end counts missed peak lock usage and that comparing entries with buckets exposed hash-table implementation assumptions; Rowley could not find an acceptable low-overhead solution #84 #86.
- Tsunakawa returned to the original linked-list remainder in September 2019, but that version eventually needed another rebase and was returned with feedback #91 #92 #93.
Jun - Jul 2021 · 2 entries
- Rowley revived the work in June 2021 with a new stable-pointer hash implementation that stored entries in compact segments and used bitmaps for fast iteration, avoiding dependence on the size of the bucket array #94.
- After Zhihong Yu's review, Rowley revised comments, renamed the implementation densehash, and optimized full-segment iteration, but reported resistance to adding another hash implementation and declined to pursue it further without interest #95 #96 #97.
Dec 2021 - Jan 2022 · 1 entry
- In January 2022, Rowley posted a different solution mostly written by Andres Freund: replace ResourceOwner's lossy lock cache with complete LOCALLOCKOWNER lists, retaining dynahash while eliminating LockReleaseAll and avoiding growth of LOCALLOCK #102.
Mar - Apr 2022 · 1 entry
- The next revision refined release helpers and removed PROCLOCK.releaseMask, while Yura Sokolov identified questionable session-owner assertions, missing frees, and potentially inefficient list insertion order #104 #105.
Aug 2022 · 1 entry
- After a rebase, Ankit Kumar Pandey reported passing regression tests but questioned missing documentation, benchmark gains, and WARNING-to-PANIC changes; Rowley supplied targeted performance results and later withdrew the severity changes while adapting a new logical-replication caller #108 #109 #110 #112.
Jan - Feb 2023 · 1 entry
- Amit Langote requested explanations of the new lists and removal of obsolete comments, and Rowley supplied those changes alongside interface fixes and an experimental Slab allocator for LOCALLOCKOWNER storage while investigating intermittent CI failures #113 #114 #115.
Jul 2023 · 1 entry
- Heikki Linnakangas found that the prepared-transaction changes could incorrectly transfer session locks, so Rowley retained the session-versus-transaction hash metadata through PostPrepare_Locks(), consolidated the series, and added missing frees #116 #117.
Sep 2023 · 1 entry
- Heikki noticed that promised assertions were absent, and Rowley resent the patch with those checks in place #118 #119.
Nov 2023 · 1 entry
- Heikki rebased the work over his ResourceOwner refactoring and requested a prepared-transaction regression test and examination of allocation-failure handling in GrantLockLocal() #120.
Jan 2024 · 1 entry
- Vignesh reported a subscription-test assertion failure in ProcKill(), showing that the revised cleanup could leave process locks behind #121.
Jan 2026 · 3 entries
- Returning in January 2026, Heikki traced the failure to exiting while waiting for a lock that had not yet been registered with its owner, split the redesign into five reviewable patches, and added explicit wait cleanup and session-lock release in ShutdownPostgres() #122.
- Andres Freund supported the standalone assertion patch and suggested registering resources earlier, while Heikki explained that the failing parallel apply worker could acquire session locks outside a transaction and said he would commit the assertions #123 #124.
- At the thread's end, the main ResourceOwner redesign remained under review: the requested test and allocation-failure concerns were still open, and Andres and Heikki were debating transaction assumptions and where LockErrorCleanup() belongs; the supplied committed result remained the earlier structure-packing change #122 #124 #125 28988a84cf.