Thread: Problem with initdb. Locale?

Problem with initdb. Locale?

From
Christian Poecher
Date:
Hi there,

I am having a hard time installing PostgreSQL for the first time. I
worked my way through the INSTALL instructions upto the initialization
of the database. ./configure --with-java, gmake, gmake install and
gmake check all run successfully. At the bottom of the mail is what I
got when trying to initdb. Someone in this list suggested a problem
with locales. Unfortunatly I am not a Linux guru (I am running Suse 8),
so I didn't understand much of that. Can someone provide me with
help/hints?

TIA chris

postgresql@ds217-115-144-40:~> /usr/local/pgsql/bin/initdb -D
/usr/local/pgsql/data
The files belonging to this database system will be owned by user
"postgresql".
This user must also own the server process.

The database cluster will be initialized with locales:
   COLLATE:  POSIX
   CTYPE:    de_DE@euro
   MESSAGES: de_DE@euro
   MONETARY: de_DE@euro
   NUMERIC:  de_DE@euro
   TIME:     de_DE@euro

fixing permissions on existing directory /usr/local/pgsql/data... ok
creating directory /usr/local/pgsql/data/base... ok
creating directory /usr/local/pgsql/data/global... ok
creating directory /usr/local/pgsql/data/pg_xlog... ok
creating directory /usr/local/pgsql/data/pg_clog... ok
selecting default max_connections... 10
selecting default shared_buffers... 50
creating configuration files... ok
creating template1 database in /usr/local/pgsql/data/base/1... FATAL:
XX000: failed to initialize lc_messages to ""
LOCATION:  InitializeGUCOptions, guc.c:1866

initdb: failed


Re: Problem with initdb. Locale?

From
Tom Lane
Date:
Christian Poecher <Poecher@gmx.net> writes:
> postgresql@ds217-115-144-40:~> /usr/local/pgsql/bin/initdb -D
> /usr/local/pgsql/data
> The files belonging to this database system will be owned by user
> "postgresql".
> This user must also own the server process.

> The database cluster will be initialized with locales:
>    COLLATE:  POSIX
>    CTYPE:    de_DE@euro
>    MESSAGES: de_DE@euro
>    MONETARY: de_DE@euro
>    NUMERIC:  de_DE@euro
>    TIME:     de_DE@euro

> fixing permissions on existing directory /usr/local/pgsql/data... ok
> creating directory /usr/local/pgsql/data/base... ok
> creating directory /usr/local/pgsql/data/global... ok
> creating directory /usr/local/pgsql/data/pg_xlog... ok
> creating directory /usr/local/pgsql/data/pg_clog... ok
> selecting default max_connections... 10
> selecting default shared_buffers... 50
> creating configuration files... ok
> creating template1 database in /usr/local/pgsql/data/base/1... FATAL:
> XX000: failed to initialize lc_messages to ""
> LOCATION:  InitializeGUCOptions, guc.c:1866

> initdb: failed

Try it with

    export LC_ALL="C"
    initdb ...

The complaint is a bit opaque :-( but it's unhappy because of the fact
that LC_MESSAGES is implicitly de_DE@euro, a setting that apparently
does not actually work on your platform.

If you don't want English error messages, you could also try
experimenting with other locale values --- "de_DE" might work for
instance.  I recommend leaving LC_COLLATE as POSIX (or equivalently C),
though.

            regards, tom lane