Re: Collation versioning
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Robert Haas <robertmhaas@gmail.com>, Michael Paquier <michael@paquier.xyz>, Douglas Doole <dougdoole@gmail.com>, Christoph Berg <myon@debian.org>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2020-02-12T20:44:40Z
Lists: pgsql-hackers
On Thu, Feb 13, 2020 at 9:16 AM Julien Rouhaud <rjuju123@gmail.com> wrote: > On Wed, Feb 12, 2020 at 08:55:06PM +0100, Laurenz Albe wrote: > > I didn't study the patch in detail, but do I get it right that there will be no > > warnings about version incompatibilities with libc collations? > > No, libc is also be supported (including the default collation), as long as we > have a way to get the version. Unfortunately, that means only linux/glibc. I > think that there was some previous discussion to work around that limitation > for other systems, using some kind of hash of the underlying collation files, > as Peter mentioned recently, but that's not part of this patchset. Yeah, this is about the cataloguing infrastructure part, to get the model and mechanisms right. To actually get version information from the underlying collation provider, there will need to be a series of per-OS projects. For glibc right now, it's done, but we just use the whole glibc version as a proxy (sadly we know this can give false positives and false negatives, but is expected to work a lot better than nothing). I hope we can get a proper CLDR version out of that library one day. For FreeBSD libc, I have patches, I just need more round tuits. For Windows, there is https://commitfest.postgresql.org/27/2351/ which I'm planning to commit soonish, after some more thought about the double-version thing. Then there is the "run a user-supplied script that gives me a version" concept, which might work and perhaps allow package maintainers to supply a script that works on each system. Again, that'd be a separate project. I guess there will probably always be some OSes that we can't get the data from so we'll probably always have to support "don't know" mode.
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