model-writtenrun 9209 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Filip RembiaĆkowski opened the thread with a GUC to disable NOTIFY duplicate removal because its linear searches produced quadratic costs in large transactions #1; his measurements showed increasingly severe slowdowns at 40,000 and 200,000 notifications #7.
- Tom Lane opposed the GUC and proposed either hash-assisted detection or bounded duplicate searches #3, while Brendan Jurd proposed per-call NOTIFY ALL syntax and a third pg_notify argument #4; Tom preferred automatic optimization and warned about exposing imperfect subtransaction semantics #5.
- Filip implemented NOTIFY ALL/DISTINCT and a boolean function argument #8; Vik Fearing identified undocumented subtransaction behavior and problems with the default-argument catalog arrangement #9, while Craig Ringer requested clearer examples of how mixed ALL and DISTINCT calls interact #13.
- Filip revised the overload and documentation #14, then fixed the contrib/tcn caller #20 and separated the three-argument C function to satisfy catalog sanity tests #21.
- The interface remained unsettled: Merlin Moncure proposed a textual mode for future extensibility #16, Josh Kupershmidt suggested parenthesized options to avoid ambiguity around ALL #18, and Tom favored matching the statement and function-call syntax #19.
- Catalin Iacob proposed explicit collapse modes and explained how an empty payload could accompany them #22 #24, but no revised patch followed during that commitfest, and David Steele returned the submission with feedback #26.
- After three years, Filip revived the work with a textual send_mode interface #27; Thomas Munro found that invalid modes failed to raise the expected errors #28, prompting a version with actual validation and parenthesized COLLAPSE options #29.
- Tom then supplied a different implementation that preserved automatic duplicate removal and built an auxiliary hash table after 16 distinct queued events #30; it also removed duplicates across subtransactions, while retaining the ordered list to avoid hash-table setup costs for small transactions.
- Tom's final submission corrected documentation and isolation-test expectations for complete duplicate removal and added a second patch storing each notification in one allocation, reporting improved performance in every case he tested #31.
- The last message left user control of duplicate removal unresolved, with Tom arguing that its semantic complexity was unnecessary after the performance fix #31; the following day, both optimization patches landed unchanged together as bb5ae8f6c4, without the proposed user-facing options.