Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm upgrading my PostgreSQL version 9.1.4 database to version 9.2.4. Both the old and the new version are the bundled versions of postgresapp.com for Mac OS X.

When trying to upgrade the database I get this error:

# pg_upgrade -b /tmp/Postgres.app/Contents/MacOS/bin \
-B /Applications/Postgres.app/Contents/MacOS/bin \
-d var-9.1 \
-D var

Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories                 ok
Checking cluster versions                                   ok
Checking database user is a superuser                       ok
Checking for prepared transactions                          ok
Checking for reg* system OID user data types                ok
Checking for contrib/isn with bigint-passing mismatch       ok
Creating catalog dump                                       ok

lc_ctype cluster values do not match:  old "de_DE", new "de_DE.UTF-8"
Failure, exiting

I searched this error message and found no useful tip to fix this. Any idea?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

You'll need to re-initdb the new database with LC_CTYPE set to de_DE (i.e. use a non-Unicode encoding); check the old DB's encoding and use the same one when you initdb the new database.

Alternately, use pg_dump and pg_restore to do a dump and reload of the old DB's contents into the new DB. This requires that you have the old DB running.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.