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. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 for Mac OS X.

When trying to upgrade the database I get this error:

# pg_upgrade -b /tmp/ \
-B /Applications/ \
-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
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

Your Answer


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.