Bug 1152556
| Summary: | RFE: detect --locale from old datadir automatically in `postgresql-setup --upgrade` | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | udo.rader |
| Component: | postgresql | Assignee: | Orphan Owner <extras-orphan> |
| Status: | ASSIGNED --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | devrim, fsa, hhorak, pkubat, praiskup, tgl |
| Target Milestone: | --- | Keywords: | EasyFix, FutureFeature, Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-10-14 12:52:53 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
udo.rader
2014-10-14 12:08:30 UTC
checking the bug list again, this seems to be closely related to #1007802. And finally, I changed my locale to en_US again but postgresql-setup upgrade still fails with this very wonderful message in the upgrade log: ---------CUT-------- lc_collate cluster values do not match: old "en_US.UTF-8", new "en_US.utf8" Failure, exiting ---------CUT-------- Yes, indeed, the lowercasing is not equal to uppercase, but that seems to be very picky ... Thanks for the report. (In reply to udo.rader from comment #1) > checking the bug list again, this seems to be closely related to #1007802. > > And finally, I changed my locale to en_US again but postgresql-setup upgrade > still fails with this very wonderful message in the upgrade log: Switching locale should not be necessary. Try this: PGSETUP_INITDB_OPTIONS="--locale=en_US.UTF-8" postgresql-setup upgrade That was added as a part of bug #1052063. > ---------CUT-------- > lc_collate cluster values do not match: old "en_US.UTF-8", new "en_US.utf8" > Failure, exiting > ---------CUT-------- > > Yes, indeed, the lowercasing is not equal to uppercase, but that seems to be > very picky ... Truth, it is picky - this has been fixed upstream in master branch for some time. Upstream commit: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=58274728fb8e087049 The fix did not get enough priority to be backpatched to upstream stable branches, so I didn't backport to f20 (taking into account there exists work-around). For F21, however, I don't think that we get this fixed via rebase to 9.4 so I'll probably backport (via the duplicate bug). *** This bug has been marked as a duplicate of bug 1007802 *** Reopening - we really should deal with this issue (somehow), even for changes like 'en_US.utf8' ~> 'de_AT.utf8'; without explicit --locale option. This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22 This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component. I am having similar problems. When installing PostgreSQL, I use LC_COLLATE=C and UTF-8 encoding. Developers recommend using C, because in this case, maximum performance and the same behavior on various operating systems (Linux, Mac OS, Windows) will be obtained: https://www.postgresql.org/docs/current/locale.html When upgrading the database, the old settings are ignored. To perform an upgrade, you must specify parameters for initdb (specify the values that were used when initializing the database): export PGSETUP_INITDB_OPTIONS="--locale=C --encoding=UTF-8"; postgresql-setup --upgrade The LC_COLLATE and LC_CTYPE settings are determined when a database is created, and cannot be changed except by creating a new database!!! This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component. |