postgresql: locale problems (guc.c)

Bug #24579 reported by Debian Bug Importer
6
Affects Status Importance Assigned to Milestone
postgresql (Debian)
Fix Released
Unknown
postgresql (Ubuntu)
Invalid
High
Martin Pitt

Bug Description

Automatically imported from Debian bug report #335676 http://bugs.debian.org/335676

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #335676 http://bugs.debian.org/335676

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Tue, 25 Oct 2005 14:26:32 +0300
From: Toni Heinonen <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: postgresql: locale problems (guc.c)

Package: postgresql
Version: 7.4.7-6sarge1
Severity: grave
Justification: renders package unusable

I've tried switching locales, ISO-8859-1/-15/UTF-8 in both en_US and fi_FI.

Suddenly, postgresql won't start anymore. Logs say:

FATAL: XX000: failed to initialize lc_messages to ""
LOCATION: InitializeGUCOptions, guc.c:1867

I've used dpkg-reconfigure locales to reinstall/regenerate locales.
I've also used dpkg-reconfigure postgresql to try basic C locale,
fi_FI, etc. Nothing works. Can't get postgresql to start.

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-386
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages postgresql depends on:
ii adduser 3.63 Add and remove users and groups
ii debconf [debconf 1.4.30.13 Debian configuration management sy
ii debianutils 2.8.4 Miscellaneous utilities specific t
ii dpkg 1.10.28 Package maintenance system for Deb
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libcomerr2 1.37-2sarge1 common error description library
ii libkrb53 1.3.6-2sarge2 MIT Kerberos runtime libraries
ii libpam0g 0.76-22 Pluggable Authentication Modules l
ii libperl5.8 5.8.4-8 Shared Perl library
ii libpq3 7.4.7-6sarge1 PostgreSQL C client library
ii libreadline4 4.3-11 GNU readline and history libraries
ii libssl0.9.7 0.9.7e-3 SSL shared libraries
ii mailx 1:8.1.2-0.20040524cvs-4 A simple mail user agent
ii postgresql-clien 7.4.7-6sarge1 front-end programs for PostgreSQL
ii procps 1:3.2.1-2 The /proc file system utilities
ii python2.3 2.3.5-3sarge1 An interactive high-level object-o
ii ucf 1.17 Update Configuration File: preserv
ii zlib1g 1:1.2.2-4.sarge.2 compression library - runtime

-- debconf information:
* postgresql/initdb/location: /var/lib/postgres/data
* postgresql/purge_data_too: true
  postgresql/upgrade/preserve_location: $PGDATA/..
* postgresql/settings/day_month_order: European
  postgresql/very_old_version_warning: true
  postgresql/upgrade/policy: true
  postgresql/upgrade/dump_location: $PGDATA/..
* postgresql/settings/locale: C
  postgresql/convert-pg_hba.conf: true
  postgresql/enable_lang: true

Revision history for this message
In , Martin Pitt (pitti) wrote : Re: Bug#335676: postgresql: locale problems (guc.c)

severity 335676 normal
tag 335676 moreinfo
thanks

Hi Toni!

Toni Heinonen [2005-10-25 14:26 +0300]:
> I've tried switching locales, ISO-8859-1/-15/UTF-8 in both en_US and fi_FI.
>
> Suddenly, postgresql won't start anymore. Logs say:
>
> FATAL: XX000: failed to initialize lc_messages to ""
> LOCATION: InitializeGUCOptions, guc.c:1867

This usually means that the PostgreSQL database cluster was configured
to use a locale which does not exist any more. Please give me the
output of the following commands:

  /usr/lib/postgresql/bin/pg_controldata /var/lib/postgres/data

  locale -a

  cat /etc/locale.gen

Thanks!

Martin
--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?

Revision history for this message
In , Toni Heinonen (toni-heinonen) wrote :

On 10/25/05, Martin Pitt <email address hidden> wrote:
> This usually means that the PostgreSQL database cluster was configured
> to use a locale which does not exist any more. Please give me the
> output of the following commands:

Hey Martin, and thanks for the speedy reply!

Sorry, but I already removed (with purge and rm -rf /var/lib/postgres)
the packages postgresql and postgresql-contrib, added a bunch of
locales, regenerated them, reinstalled and chose a UTF-8 locale this
time. It started working.

However, I do believe dpkg-reconfigure postgresql gave me the option
to choose a locale (and it showed the correct choices), yet didn't
change the option in postgresql itself.

best regards,
--
Toni Heinonen ~ <email address hidden> ~ http://tonih.iki.fi/ ~ 040-836 1815
"Have patience awhile; slanders are not long-lived. Truth is the child of time;
erelong she shall appear to vindicate thee." - Immanuel Kant

Revision history for this message
Martin Pitt (pitti) wrote :

This one has a highly inflated severity and is probably just PEBCAK. I'll track
it in the Debian BTS, no need to dup it here.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 25 Oct 2005 16:02:47 +0200
From: Martin Pitt <email address hidden>
To: Toni Heinonen <email address hidden>, <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#335676: postgresql: locale problems (guc.c)

--KFztAG8eRSV9hGtP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

severity 335676 normal
tag 335676 moreinfo
thanks

Hi Toni!

Toni Heinonen [2005-10-25 14:26 +0300]:
> I've tried switching locales, ISO-8859-1/-15/UTF-8 in both en_US and fi_F=
I.
>=20
> Suddenly, postgresql won't start anymore. Logs say:
>=20
> FATAL: XX000: failed to initialize lc_messages to ""
> LOCATION: InitializeGUCOptions, guc.c:1867

This usually means that the PostgreSQL database cluster was configured
to use a locale which does not exist any more. Please give me the
output of the following commands:

  /usr/lib/postgresql/bin/pg_controldata /var/lib/postgres/data

  locale -a

  cat /etc/locale.gen

Thanks!

Martin
--=20
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?

--KFztAG8eRSV9hGtP
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDXjsHDecnbV4Fd/IRAjjEAJ0fcxwRcMKkFI88uRJaXd6naGw8DwCgo1ci
q5r7Xxxqn6VPMrUrHpjUj44=
=SX9t
-----END PGP SIGNATURE-----

--KFztAG8eRSV9hGtP--

Revision history for this message
In , Martin Pitt (pitti) wrote :

Hi Toni!

Toni Heinonen [2005-10-25 17:37 +0300]:
> Sorry, but I already removed (with purge and rm -rf /var/lib/postgres)
> the packages postgresql and postgresql-contrib, added a bunch of
> locales, regenerated them, reinstalled and chose a UTF-8 locale this
> time. It started working.

OK, that's what I expected.

> However, I do believe dpkg-reconfigure postgresql gave me the option
> to choose a locale (and it showed the correct choices), yet didn't
> change the option in postgresql itself.

The problem is that you can't change the locale of a cluster, so the
debconf question should not be asked if a cluster already exists.
Silly bug, but too late to change for Sarge, and the new packages in
Sid/Etch do not have that problem in the first place.

Thanks!

Martin

--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 25 Oct 2005 17:37:15 +0300
From: Toni Heinonen <email address hidden>
To: Martin Pitt <email address hidden>
Cc: <email address hidden>, <email address hidden>
Subject: Re: Bug#335676: postgresql: locale problems (guc.c)

On 10/25/05, Martin Pitt <email address hidden> wrote:
> This usually means that the PostgreSQL database cluster was configured
> to use a locale which does not exist any more. Please give me the
> output of the following commands:

Hey Martin, and thanks for the speedy reply!

Sorry, but I already removed (with purge and rm -rf /var/lib/postgres)
the packages postgresql and postgresql-contrib, added a bunch of
locales, regenerated them, reinstalled and chose a UTF-8 locale this
time. It started working.

However, I do believe dpkg-reconfigure postgresql gave me the option
to choose a locale (and it showed the correct choices), yet didn't
change the option in postgresql itself.

best regards,
--
Toni Heinonen ~ <email address hidden> ~ http://tonih.iki.fi/ ~ 040-836 1815
"Have patience awhile; slanders are not long-lived. Truth is the child of t=
ime;
erelong she shall appear to vindicate thee." - Immanuel Kant

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Tue, 25 Oct 2005 18:03:48 +0200
From: Martin Pitt <email address hidden>
To: <email address hidden>
Subject: Re: Bug#335676: postgresql: locale problems (guc.c)

--ZoaI/ZTpAVc4A5k6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Toni!

Toni Heinonen [2005-10-25 17:37 +0300]:
> Sorry, but I already removed (with purge and rm -rf /var/lib/postgres)
> the packages postgresql and postgresql-contrib, added a bunch of
> locales, regenerated them, reinstalled and chose a UTF-8 locale this
> time. It started working.

OK, that's what I expected.

> However, I do believe dpkg-reconfigure postgresql gave me the option
> to choose a locale (and it showed the correct choices), yet didn't
> change the option in postgresql itself.

The problem is that you can't change the locale of a cluster, so the
debconf question should not be asked if a cluster already exists.
Silly bug, but too late to change for Sarge, and the new packages in
Sid/Etch do not have that problem in the first place.

Thanks!

Martin

--=20
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?

--ZoaI/ZTpAVc4A5k6
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDXldkDecnbV4Fd/IRAlwCAKD+ObvfzHi5+rUAa8hQLCWm/byLjgCgtIK3
3QeuTPHb8R3Kp/tY4LzX+UI=
=5nxY
-----END PGP SIGNATURE-----

--ZoaI/ZTpAVc4A5k6--

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.