Re: Collation versioning
Julien Rouhaud <rjuju123@gmail.com>
From: Julien Rouhaud <rjuju123@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Douglas Doole <dougdoole@gmail.com>, Thomas Munro <thomas.munro@enterprisedb.com>,
Christoph Berg <myon@debian.org>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-10-31T13:21:03Z
Lists: pgsql-hackers
Hello Thomas, On Tue, May 28, 2019 at 9:00 PM Thomas Munro <thomas.munro@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
Commits
-
Doc: Document known problem with Windows collation versions.
- 1bf946bd43e5 14.0 landed
-
Add collation versions for FreeBSD.
- ca051d8b101d 14.0 landed
-
Tolerate version lookup failure for old style Windows locale names.
- 9f12a3b95dd5 14.0 landed
-
Track collation versions for indexes.
- 257836a75585 14.0 landed
-
Add pg_depend.refobjversion.
- cd6f479e79f3 14.0 landed
-
Remove pg_collation.collversion.
- 7d1297df0830 14.0 landed
-
Fix the MSVC build for versions 2015 and later.
- a169155453e3 13.0 cited
-
Add collation versions for Windows.
- 352f6f2df60f 13.0 cited
-
Implement type regcollation
- a2b1faa0f279 13.0 landed
-
Use libc version as a collation version on glibc systems.
- d5ac14f9ccdd 13.0 landed
- 9f90b1d08d79 13.0 landed
-
Make type "name" collation-aware.
- 586b98fdf1aa 12.0 cited