I recently switched the localed of my development laptop from en_US.utf8 to de_AT.utf8. After the switch and after some upgrades later, my postgres would not start anymore: -----------CUT----------- % systemctl start postgresql Job for postgresql.service failed. See 'systemctl status postgresql.service' and 'journalctl -xn' for details. Version-Release number of selected component (if applicable): -----------CUT----------- Which leads me to the following journalctl -x output -----------CUT----------- [...] Oct 14 13:59:47 artio.bestsolution.at postgresql-check-db-dir[11400]: An old version of the database format was found. Oct 14 13:59:47 artio.bestsolution.at postgresql-check-db-dir[11400]: Use "postgresql-setup upgrade" to upgrade to version 9.3. Oct 14 13:59:47 artio.bestsolution.at postgresql-check-db-dir[11400]: See /usr/share/doc/postgresql/README.rpm-dist for more information. Oct 14 13:59:47 artio.bestsolution.at systemd[1]: postgresql.service: control process exited, code=exited status=1 Oct 14 13:59:47 artio.bestsolution.at systemd[1]: Failed to start PostgreSQL database server. [...] -----------CUT----------- % postgresql-setup upgrade ... then fails as well, leaving this in /var/lib/pgsql/pgupgrade.log: -----------CUT----------- Performing Consistency Checks [...] lc_collate cluster values do not match: old "en_US.UTF-8", new "de_DE.utf8" Failure, exiting [...] -----------CUT----------- unfortunately, no matter if I force LC_COLLATE or even LC_ALL to be en_US.UTF-8 or also export it, the upgrade still fails: % LC_ALL=en_US.UTF-8 postgresql-setup upgrade Upgrading database: failed [...] % export LC_ALL=en_US.UTF-8 && postgresql-setup upgrade Upgrading database: failed [...] I can probably change my system locale to en_US.UTF-8 again, but that would cause some other sideeffects that I want to prevent.
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!!!