Re: Bogus collation version recording in recordMultipleDependencies
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-04-20T03:07:16Z
Lists: pgsql-hackers
On Tue, Apr 20, 2021 at 1:48 PM Julien Rouhaud <rjuju123@gmail.com> wrote: > On Tue, Apr 20, 2021 at 12:05:27PM +1200, Thomas Munro wrote: > > Yeah, that runs directly into non-trivial locking problems. I felt > > like some of the other complaints could conceivably be addressed in > > time, including dumb stuff like Windows default locale string format > > and hopefully some expression analysis problems, but not this. I'll > > hold off reverting for a few more days to see if anyone has any other > > thoughts on that, because there doesn't seem to be any advantage in > > being too hasty about it. > > I also feel that the ALTER TYPE example Tom showed earlier isn't something > trivial to fix and cannot be done in pg14 :( Just an idea: It might be possible to come up with a scheme where ALTER TYPE ADD ATTRIBUTE records versions somewhere at column add time, and index_check_collation_versions() finds and checks those when they aren't superseded by index->collation versions created by REINDEX, or already present due to other dependencies on the same collation. Of course, the opposite problem applies when you ALTER TYPE DROP ATTRIBUTE: you might have some zombie refobjversions you don't need anymore, but that would seem to be the least of your worries if you drop attributes from composite types used in indexes: create type myrow as (f1 int, f2 int); create table mytable (r1 myrow primary key); insert into mytable select row(generate_series(1, 10), generate_series(10, 1, -1))::myrow; select * from mytable; alter type myrow drop attribute f1; select * from mytable; select * from mytable where r1 = row(6); -- !!! reindex table mytable; select * from mytable where r1 = row(6);
Commits
-
Doc: Update notes about libc collation versions.
- b65431ca5e12 14.0 landed
-
Revert per-index collation version tracking feature.
- ec4831470826 14.0 landed
-
Rethink extraction of collation dependencies.
- f24b15699705 14.0 landed
-
Fix bogus collation-version-recording logic.
- ef387bed87f2 14.0 landed
-
Rename the "point is strictly above/below point" comparison operators.
- 0cc993278888 14.0 cited
-
Move catalog toast table declarations
- b4c9695e79f7 14.0 cited