On Tue, Feb 18, 2025 at 8:34 AM Laurenz Albe <laurenz.a...@cybertec.at> wrote: > Just for the record: a customer just ran into this bug. REINDEX did > not fix the bad query result, but update to 17.3 did.
That's surprising, since REINDEX definitely will "fix" my test case when run on an unpatched server with the bug. The issue that my repro highlighted hinged upon 2 low-order truncated attributes. nbtsort.c (used by CREATE INDEX/REINDEX) doesn't care about making suffix truncation as effective as reasonably possible, unlike retail inserts + page splits, which use the nbtsplitloc.c logic for this. This was also why index fillfactor was tuned by the test case. Basically, the test case is very sensitive to various parameters. -- Peter Geoghegan