Re: [HACKERS] move collation import to backend - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] move collation import to backend
Date
Msg-id 16636.1484755933@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] move collation import to backend  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes:
> With this commit, I'm getting 'make check' fail at initdb with the error:

> 2017-01-18 07:47:50.565 PST [43691] FATAL:  collation "aa_ER@saaho" for
> encoding "UTF8" already exists

Yeah, so are large chunks of the buildfarm.  Having now read the patch,
I see that the problem is that it simply ignored the de-duplication
logic that existed in initdb's implementation.  That was put there
on the basis of bitter experience, as I recall.

The new code seems to think it's sufficient to do an "if not exists"
insertion when generating abbreviated names, but that's wrong, and
even if it avoided outright failures, it would be nondeterministic
(I doubt "locale -a" is guaranteed to emit locale names in any
particular order).

I think this needs to be reverted pending redesign of the de-duplication
coding.
        regards, tom lane



pgsql-hackers by date:

Previous
From: "Karl O. Pinc"
Date:
Subject: Re: [HACKERS] Patch to implement pg_current_logfile() function
Next
From: Corey Huinker
Date:
Subject: Re: [HACKERS] PSQL commands: \quit_if, \quit_unless