Public bug reported:

Binary package hint: postgresql-common

After upgrading from gutsy (postgresql-8.2) to hardy (postgresql-8.3) is tried 
to upgrade my 'main' cluster' using `sudo 
pg_upgradecluster 8.2 main`. It however chooses the wrong encoding "LATIN1" 
instead of "UTF8" which is used in all of the databases 
and renders the resulting databases unusable.

Version '88' from intrepid resulted in the same errors.

It seems related to https://bugs.launchpad.net/ubuntu/+source
/postgresql-common/+bug/207779.

`locale` returns the following:
LANG=nl_NL.UTF-8
LANGUAGE=nl_NL:nl
LC_CTYPE="nl_NL.UTF-8"
LC_NUMERIC="nl_NL.UTF-8"
LC_TIME="nl_NL.UTF-8"
LC_COLLATE="nl_NL.UTF-8"
LC_MONETARY="nl_NL.UTF-8"
LC_MESSAGES="nl_NL.UTF-8"
LC_PAPER="nl_NL.UTF-8"
LC_NAME="nl_NL.UTF-8"
LC_ADDRESS="nl_NL.UTF-8"
LC_TELEPHONE="nl_NL.UTF-8"
LC_MEASUREMENT="nl_NL.UTF-8"
LC_IDENTIFICATION="nl_NL.UTF-8"
LC_ALL=

 * I tried running `sudo locale-gen nl_NL.UTF-8` but that didn't solve
the problem (as it did before in upgrading from 8.1 to 8.2).

Here are the results:

sudo pg_upgradecluster 8.2 main
Creating new cluster (configuration: /etc/postgresql/8.3/main, data: 
/var/lib/postgresql/8.3/main)...
Moving configuration file /var/lib/postgresql/8.3/main/postgresql.conf to 
/etc/postgresql/8.3/main...
Moving configuration file /var/lib/postgresql/8.3/main/pg_hba.conf to 
/etc/postgresql/8.3/main...
Moving configuration file /var/lib/postgresql/8.3/main/pg_ident.conf to 
/etc/postgresql/8.3/main...
Configuring postgresql.conf to use port 5434...
Disabling connections to the old cluster during upgrade...
Disabling connections to the new cluster during upgrade...
Re-enabling connections to the old cluster...
Re-enabling connections to the new cluster...
Creating globals...
Fixing hardcoded library paths for stored procedures...
Upgrading database roundcubemail...
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 1681; 0 16427 TABLE DATA 
messages roundcube
pg_restore: [archiver (db)] COPY failed: ERROR:  character 0xe280a6 of encoding 
"UTF8" has no equivalent in "LATIN1"
CONTEXT:  COPY messages, line 2863
WARNING: errors ignored on restore: 1
Analyzing database roundcubemail...
Fixing hardcoded library paths for stored procedures...
Upgrading database trac-administratief...
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 1697; 0 16529 TABLE DATA 
milestone postgres
pg_restore: [archiver (db)] COPY failed: ERROR:  character 0xe2809c of encoding 
"UTF8" has no equivalent in "LATIN1"
CONTEXT:  COPY milestone, line 1
pg_restore: [archiver (db)] Error from TOC entry 1705; 0 16569 TABLE DATA 
ticket postgres
pg_restore: [archiver (db)] COPY failed: ERROR:  character 0xe28099 of encoding 
"UTF8" has no equivalent in "LATIN1"
CONTEXT:  COPY ticket, line 54
pg_restore: [archiver (db)] Error from TOC entry 1709; 0 16592 TABLE DATA wiki 
postgres
pg_restore: [archiver (db)] COPY failed: ERROR:  character 0xe6bca2 of encoding 
"UTF8" has no equivalent in "LATIN1"
CONTEXT:  COPY wiki, line 23
WARNING: errors ignored on restore: 3
Analyzing database trac-administratief...
Fixing hardcoded library paths for stored procedures...
...
(all other databases have similar results)


 * tried editing `/usr/share/postgresql-common/PgCommon` to force it to use 
"UTF8" but that resulted in:
sudo pg_upgradecluster 8.2 main
Creating new cluster (configuration: /etc/postgresql/8.3/main, data: 
/var/lib/postgresql/8.3/main)...
initdb: encoding mismatch
The encoding you selected (UTF8) and the encoding that the
selected locale uses (LATIN1) do not match.  This would lead to
misbehavior in various character string processing functions.
Rerun initdb and either do not specify an encoding explicitly,
or choose a matching combination.
Error: initdb failed
Error: Could not create target cluster

ProblemType: Bug
Architecture: i386
Date: Tue May 27 21:06:25 2008
DistroRelease: Ubuntu 8.04
Package: postgresql-common 88
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=nl_NL.UTF-8
 LANGUAGE=nl_NL:nl
SourcePackage: postgresql-common
Uname: Linux 2.6.22-14-server i686

** Affects: postgresql-common (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug

-- 
pg_upgradecluster picks wrong encoding (LATIN1 instead of UTF8)
https://bugs.launchpad.net/bugs/235302
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to