Re: Collation versioning
Thomas Munro <thomas.munro@enterprisedb.com>
From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Douglas Doole <dougdoole@gmail.com>
Cc: Greg Stark <stark@mit.edu>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Christoph Berg <myon@debian.org>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-09-23T21:48:13Z
Lists: pgsql-hackers
On Tue, Sep 18, 2018 at 7:57 AM Douglas Doole <dougdoole@gmail.com> wrote: > On Mon, Sep 17, 2018 at 12:32 PM Greg Stark <stark@mit.edu> wrote: >> This seems like a terrible idea in the open source world. Surely collation versioning means new ICU libraries can still provide the old collation rules so even if you update the library you can request the old version? We shouldn't need that actual old code with all its security holes and bugs just to get the old collation version. > > > We asked long and hard for this feature from the ICU team but they kept arguing it was too hard to do. There are apparently some tight couplings between the code and each version of CLDR. So the only way to support old collations is to ship the entire old library. (They even added make rules to allow the entire API to be version extended to accommodate this requirement.) I wonder if this would be best modelled by entirely separate collation entries with different OIDs, and possibly also separate collation providers. Considering that to handle this we'd need to figure out how link libicu.so.55, libicu.so.56, ... etc into the same backend, and yet they presumably have the same collation names, doing it as separate providers would create separate namespaces for their collcollate values and reflect the reality that they really are entirely independent providers. Admittedly that creates a whole can of worms for initdb-time catalog creation, package maintainers' jobs, how long old versions have to be supported and how you upgraded database objects to new ICU versions. This kind of "major" versioning with support for concurrently accessible major versions seems to be different from the kind of version changes that happen under your feet when libraries/collation definition files are updated. > Even bug fixes are potentially problematic because the fix may alter how some code points collate. The ICU team won't (or at least wouldn't - been a few years since I dealt with them) guarantee any sort of backwards compatibility between code drops. Yeah, it seems like ICU is *also* subject to minor changes that happen under your feet, much like libc. For example maintenance release 60.2 (you can't install that at the same time as 60.1, but you can install it at the same time as 59.2). You'd be linked against libicu.so.60 (and thence libicudata.so.60), and it gets upgraded in place when you run the local equivalent of apt-get upgrade. -- Thomas Munro http://www.enterprisedb.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