Re: PostgreSQL upgrade -> fails to start server

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL upgrade -> fails to start server
Date: 2003-08-29 11:27:30
Message-ID: 20030829112730.GB14973@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok, IIRC the reason you need to initdb is because indexes use your specific
locale to work. Without knowing the locale, indexes can't be used.

That said, it seems to be a bit strict to refuse to start the server.

In any case, there is a program pg_controldata which dumps the current
locale. It may help to determine if you edit pg_control properly.

Once you can start it, pg_dumpall and restart. Ofcourse, if you have
backups...

In any case, as a last resort you can try pgfsck
(http://svana.org/kleptog/pgfsck.html). It ignores your locale and so may be
able to recover some of your data.

Hope this helps,

On Fri, Aug 29, 2003 at 11:58:37AM +0200, Sander Smeenk wrote:
> Hi,
>
> After a very recent postgresql update, the postmaster failed to start
> because of this:
>
> | PANIC: The database cluster was initialized with LC_CTYPE
> | 'nl_NL(at)euro(dot)UTF-8', which is not recognized by setlocale().
> | It looks like you need to initdb.
>
> Now I know nl_NL(at)euro(dot)UTF-8 is an incorrect locale, I fixed that some
> time ago, but because postgresql kept on running, and the machine didn't
> reboot in the mean time, I noticed nothing when the new libc's / locales
> stopped 'supporting' that (faulty) locale.
>
> To make a long story short: i can't activate that locale again,
> therefore the postmaster won't start, and therefore I can't salvage my
> databases to re-create them & finish the postgresql upgrade.
>
> Now I found out the binary file data/global/pg_control matches the
> faulty locale, so I tried to vi that in a desperate attempt to start the
> server, but it failed and I had to restore the original.
>
> Is there some way that I can get to my precious databases?
> I fear that downgrading postgresql won't work, because the locale still
> isn't available, so it probably won't start either.
>
> Help? :)
>
> I'm running Debian Unstable, libc6/locales 2.3.2, postgresql 7.3.4.
>
> Thanks!
> Sander.
> --
> | A conscience is what hurts when all of your other parts feel so good.
> | 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8 9BDB D463 7E41 08CE C94D
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steven Tower 2003-08-29 11:37:55 Re: select taking forever
Previous Message Shridhar Daithankar 2003-08-29 11:14:33 Re: select taking forever