Hi again, ah, I was able to get something like this the other way round:
$ sudo locale-gen de_DE
$ sudo pg_createcluster 8.1 test --start
$ sudo -u postgres createdb -E LATIN1 test
$ sudo rm -r /usr/lib/locale/de_DE
$ sudo pg_upgradecluster 8.1 test
Upgrading database test...
pg_restore: [Archivierer (DB)] Fehler in Phase PROCESSING TOC:
pg_restore: [Archivierer (DB)] Fehler in Inhaltsverzeichniseintrag 1502; 1262
16384 DATABASE test postgres
pg_restore: [Archivierer (DB)] could not execute query: FEHLER: Encoding
LATIN1 stimmt nicht mit der Server-Locale de_DE.UTF-8 �berein
DETAIL: Die LC_TYPE-Locale des Servers verlangt die Kodierung UTF8.
Command was:
CREATE DATABASE test WITH TEMPLATE = template0 ENCODING = 'LATIN1';
pg_restore: [Archivierer (DB)] could not execute query: FEHLER: Datenbank
�test� existiert nicht
Command was: ALTER DATABASE test OWNER TO postgres;
pg_restore: [Archivierer (DB)] konnte nicht wieder zur Datenbank verbinden:
FATAL: Datenbank »test« existiert nicht
In other words, the default encoding was UTF-8, but one database was
encoded as LATIN1, which didn't exist any more. While this could be
checked in advance with a similar check like the default encoding
(pg_ctlcluster complains and aborts, like in my previous mail), and
I'll fix that, that use case does not seem to match what you reported.
So, do you have any other idea what was different for you?
Thanks,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
My 5 today: #103831 (hal-info), #120413 (hal-info), #191737 (hal-info),
#94924 (hal-info), #114443 (hal-info)
Do 5 a day - every day! https://wiki.ubuntu.com/5-A-Day
signature.asc
Description: Digital signature

