Re: Collation versioning
Christoph Berg <myon@debian.org>
From: Christoph Berg <myon@debian.org>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Thomas Munro <thomas.munro@gmail.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Laurenz Albe <laurenz.albe@cybertec.at>, Douglas Doole <dougdoole@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2020-09-08T19:33:26Z
Lists: pgsql-hackers
Re: Julien Rouhaud > Here's the rationale for this new flag, extracted from the patch's commit > message: > > Add a new amnostablecollorder flag in IndexAmRoutine. > > This flag indicates if the access method does not rely on a stable collation > ordering for deterministic collation, i.e. would not be corrupted if the > underlying collation library changes its ordering. This is done this way to > make sure that if any external access method isn't updated to correctly setup > this flag it will be assumed to rely on a stable collation ordering as this > should be the case for the majority of access methods. > > This flag will be useful for an upcoming commit that will add detection of > possibly corrupted index due to changed collation library version. Hmm. Does that flag gain us much? What about non-collation locale changes that might still affect indexes like lower() and the citext extension? That still depends on locale changes, but that flag wouldn't be able to help with "this index is (not) affected by this locale change". IOW, I think we should aim at simply tracking the version, and leave it to the admin (with the help of supplied SQL queries) to either rebuild indexes or waive them. Or maybe I misunderstood the problem. Christoph
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