model-writtenrun 683 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- 王跃林 opened the public thread in #1 by forwarding the security team's recommendation to report the issue as a bug, following its assessment that the reported authenticated SQL denial of service did not qualify as a security vulnerability.
- Ayush Tiwari proposed distinguishing leaf and internal pages for NotEqual searches in #2, avoiding type-specific equality calls on internal bit/varbit keys; his test exercised the unsafe path under ASan but passed on ordinary builds, and 王跃林 endorsed the fix in #3.
- Tom Lane initially questioned why other comparisons were safe and suggested custom bit truncation in #4, but Ayush explained that internal bit keys are transformed into bytea in #5; Tom accepted that explanation and requested documentation of the callback contract in #6, prompting Ayush's documented revision in #7.
- Tom expanded the work into five patches in #8: comprehensive documentation, Ayush's NotEqual fix, a newly discovered bit index-build comparator bug, lower-bound prefix-check cleanup, and removal of encoding-aware truncation code; he omitted the regression test because its cost seemed unjustified when it exposed no failure in ordinary builds.
- Tom also proposed avoiding descent when untruncated bounds both equal the query in #8; Ayush validated that optimization, approved the documentation and comparator patches, and suggested removing an unused include in #9.
- Tom planned to backpatch only the two bug fixes and proposed removing unnecessary prefix checks from the less-than strategies in #10; Ayush confirmed the reasoning and reported passing regression tests for that extension in #11.
- Tom's measurements in #12 showed that the comparator correction reduced buffer accesses for a variable-width bit query from 111 to 48, while fixed-width bit data showed no benefit; the comparator patch from #8 landed unchanged apart from rebasing as 558c4ea9a4, with backports through PostgreSQL 18.
- The documentation patch from #8 landed as d6284bbd15, omitting its now-obsolete comment about the comparator already fixed by 558c4ea9a4.
- Ayush's NotEqual patch, carried in #8, landed as 286f9a3cec with the discussed untruncated-bound pruning and a corresponding fixed-size branch cleanup, and was backpatched through PostgreSQL 14.
- Tom added a separate cleanup without an attached patch, 4b808ed77c, passing strategy numbers by value to gbt_num_consistent() and making the gbt_var_consistent() key argument const.
- The prefix-check cleanup from #8 became fea9c1884b, incorporating the tested less-than simplification and further refactoring both consistent functions around named bound checks and index-key-first comparisons; the questionable analogous check in gbt_var_penalty() remained because its usefulness was uncertain and its performance cost appeared negligible.
- The encoding-aware truncation cleanup from #8 landed as b82d69abf6, including Ayush's unused-include removal from #9; Tom confirmed in #13 that everything had been pushed, leaving no submitted patch awaiting review.