Hello Thomas, On Tue, May 28, 2019 at 9:00 PM Thomas Munro <thomas.mu...@gmail.com> wrote: > > Since there's a chance of an "unconference" session on locale versions > tomorrow at PGCon, here's a fresh rebase of the patchset to add > per-database-object collation version tracking. It doesn't handle > default collations yet (not hard AFAIK, will try that soon), but it > does work well enough to demonstrate the generate principal. I won't > attach the CHECK support just yet, because it needs more work, but the > point of it was to demonstrate that pg_depend can handle this for all > kinds of database objects in one standard way, rather than sprinkling > collation version stuff all over the place in pg_index, pg_constraint, > etc, and I think it did that already.
Are you planning to continue working on it? For the record, that's something needed to be able to implement a filter in REINDEX command [1]. I'm not sending a review since the code isn't finished yet, but one issue with current approach is that the WARNING message recommending to issue a REINDEX can be issued when running the required REINDEX, which is at best unhelpful: # update pg_depend set refobjversion = 'a' || refobjversion where refobjversion != ''; # reindex table t1; WARNING: 01000: index "t1_val_idx" depends on collation 13330 version "a153.97.35.8", but the current version is "153.97.35.8" DETAIL: The index may be corrupted due to changes in sort order. HINT: REINDEX to avoid the risk of corruption. LOCATION: index_check_collation_version, index.c:1263 [1]: https://www.postgresql.org/message-id/a81069b1-fdaa-ff40-436e-7840bd639ccf%402ndquadrant.com