model-writtenrun 4233 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tomas Vondra opened the thread with a prototype to avoid rescanning a BRIN index for every IN-list value, using sorted arrays for minmax searches and cached hashes for Bloom filters, while identifying compatibility problems with changing consistent-function signatures #1.
- Tomas then introduced an optional preprocessing support procedure called from brinrescan(), storing replacement scan keys in BrinOpaque without changing consistent-function signatures, and reported substantial benchmark improvements for larger IN lists #2.
- The next revisions fixed NULL array handling, completed minmax-multi's use of preprocessed values, added regression tests, and bypassed preprocessing for NULL scan arguments to fix Bloom IS [NOT] NULL queries #3 #4.
- Heikki Linnakangas reviewed the preliminary cleanup, sizing, and test patches, suggested bool variables instead of Datum variables, and questioned the test-data formulas; Tomas explained the deterministic data generation and his initial preference for minimal changes suitable for backpatching #5 #6.
- After several months, Tomas rebased the nine-patch series without substantive changes and revisited whether to backpatch the preparatory cleanups #7.
- Tomas landed the preparatory work from #7 as a combined cleanup adopting Heikki's bool suggestion 28d03feac3, an unchanged Bloom sizing extraction 2b8b2852bb, and expanded minmax-multi execution tests with additional range assertions 0457109344.
- Tomas posted the five remaining feature patches, adding support for raw array keys when an opclass lacks preprocessing, and explained that the preparatory commits were not backpatched because the changes were less disruptive than expected #8.
- Heikki challenged the separate preprocessing procedure and proposed per-scan-key scratch space, generic array handling in the BRIN access method, and a new support-procedure number for optimized consistent functions; Tomas agreed to investigate scratch space in BrinDesc #9 #10.
- Heikki also suggested an optional array-only consistent function and using scratch space to cache scalar Bloom hashes; Tomas agreed that BRIN would need to identify array-capable opclasses and emulate array searches for others #11 #12.
- Tomas found that associating per-scan-key scratch space with BrinDesc was difficult for older consistent functions and for separately dispatched array keys, leaving the storage and API design unresolved #13.
- In January 2024, Tomas reaffirmed interest but said the compatibility and scratch-space questions still blocked progress; after Vignesh's status inquiry, the remaining feature work was marked Returned with Feedback, with only the preparatory commits landed #14 #15 #16.