Re: Collation versioning
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>,
Thomas Munro <thomas.munro@gmail.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Robert Haas <robertmhaas@gmail.com>,
Laurenz Albe <laurenz.albe@cybertec.at>, Douglas Doole
<dougdoole@gmail.com>, Christoph Berg <myon@debian.org>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2020-07-09T08:00:55Z
Lists: pgsql-hackers
On 2020-07-08 08:26, Michael Paquier wrote:
> On Wed, Jul 08, 2020 at 06:12:51PM +1200, Thomas Munro wrote:
>> I still wish I had a better idea than this:
>>
>> +/*
>> + * Returns whether the given index access method depend on a stable collation
>> + * order.
>> + */
>> +static bool
>> +index_depends_stable_coll_order(Oid amoid)
>> +{
>> + return (amoid != HASH_AM_OID &&
>> + strcmp(get_am_name(amoid), "bloom") != 0);
>> +}
>>
>> I'm doing some more testing and looking for weird cases... More soon.
>
> Wouldn't the normal way to track that a new field in IndexAmRoutine?
> What you have here is not extensible.
Yeah, this should be decided and communicated by the index AM somehow.
Perhaps it would also make sense to let the index AM handle the
differences between deterministic and nondeterministic collations. I
don't know how the bloom AM works, though, to determine whether that
makes sense.
In order not to derail this patch set I think it would be okay for now
to just include all index AMs in dependency tracking and invent a
mechanism later that excludes hash and bloom in an extensible manner.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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