On Mon, Mar 15, 2021 at 10:13:55AM -0700, Mark Dilger wrote: > > > > On Mar 15, 2021, at 9:52 AM, Julien Rouhaud <rjuju...@gmail.com> wrote: > > > > But there are also the tests in collate.icu.utf8.out which will fake > > outdated > > collations (that's the original tests for the collation tracking patches) > > and > > then check that outdated indexes are reindexed with both REINDEX and REINDEX > > (OUDATED). > > > > So I think that all cases are covered. Do you want to have more test cases? > > I thought that just checked cases where a bogus 'not a version' was put into > pg_catalog.pg_depend. I'm talking about having a collation provider who > returns a different version string and has genuinely different collation > rules between versions, thereby breaking the index until it is updated. Is > that being tested?
No, we're only checking that the infrastructure works as intended. Are you saying that you want to implement a simplistic collation provider with "tunable" ordering, so that you can actually check that an ordering change will be detected as a corrupted index, as in you'll get some error or incorrect results? I don't think that this infrastructure is the right place to do that, and I'm not sure what would be the benefit here. If a library was updated, the underlying indexes may or may not be corrupted, and we only warn about the discrepancy with a low overhead.