Re: Trouble running PostgreSQL server / Server must be started under certain locale.

From: Richard Huxton <dev(at)archonet(dot)com>
To: Geoff Ellingwood <neppyman(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Trouble running PostgreSQL server / Server must be started under certain locale.
Date: 2007-12-19 13:40:51
Message-ID: 47691F63.4060400@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Geoff Ellingwood wrote:
> I'm in the process of getting Subversion and Trac running on my development
> machine. So far, the installation process has gone fairly smoothly, until I
> had to install the Subversion bindings for Python. Because I run Ubuntu,
> and Ubuntu did not have the latest bindings in its repositories, I had to
> get it from the Debian archives instead. Well, after doing this, the
> PostgreSQL server is now refusing to start.

If you're not familiar with your system, you really are better off
staying with the packages your distribution supports.

> The following error message is given:
> neppyman(at)loki:~$ sudo /etc/init.d/postgresql-8.1 start
> * Starting PostgreSQL 8.1 database server
> * Error: The server must be started under the locale en_US.UTF-8 which does
> not exist any more.
>
> Checking my locales tels me...
>
> neppyman(at)loki:~$ locale -a
> (snip)
> en_US.utf8
>
> Obviously there's a mismatch there, but I'm still learning Linux, so I don't
> really know how to fix it. I've tried uninstalling and reinstalling the
> locales package, but that didn't help.

Presumably it's getting the locale details from the wrong repository
(Debian unstable, I guess you're using). Did you agree to install a
whole bunch of other packages when you were trying to sort out this
Python thing?

> Any help would be appreciated; I have quite a bit of data in my 8.1 cluster
> (active phpBB, etc.), and while I could upgrade to 8.2 or even the 8.3 beta,
> I don't know how I would be able to migrate a database if the postmaster
> process is unable to start.

Step 1 is to make sure you have a backup of your database directory.
That's *everything* in .../pgsql/data (or wherever). You're going to
have to get the database running again and dump it.

Step 2 will be to revert the locale packages (at least). I'd actually
recommend going back to a completely "clean" system and staring again
unless you're clear what's gone wrong.

You'll need to read this and figure out exactly what changes you've made
first.
http://www.debian.org/doc/manuals/apt-howto/
Sections 3.8/9/10 are probably the most important, but read the lot
before doing anything.

Best bet for help then is an ubuntu/debian list, but as long as you've
got backups you'll be OK.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Glyn Astill 2007-12-19 14:17:07 Initdb problem - catch 22?
Previous Message Richard Huxton 2007-12-19 13:26:11 Re: foreign key constraint, planner ignore index.