Skip site navigation (1) Skip section navigation (2)

Re: PostgreSQL upgrade -> fails to start server

From: Sander Smeenk <ssm+pgsql(at)freshdot(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL upgrade -> fails to start server
Date: 2003-08-29 11:56:14
Message-ID: 20030829115614.GD25611@freshdot.net (view raw or flat)
Thread:
Lists: pgsql-general
Quoting Martijn van Oosterhout (kleptog(at)svana(dot)org):

> 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.

I thought so too. But then I thought maybe the data stored inside the
database is affected by this locale setting too?

> 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.

It's impossible to edit pg_control by hand with something like a hex
editor because it has checksums to verify it's integrity.

I'd need to create a program that constructs the pg_control internal
structure to change the locale stored inside.

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

The data is not yet lost. It's still on my disk. It's just that the
postmaster won't start because of this locale-thing. To fix it I need
the postmaster running, and to get the postmaster running, I need to fix
it. It loops :)

> In any case, as a last resort you can try pgfsck. It ignores your
> locale and so may be able to recover some of your data.

I downloaded pgfsck and ran it over the database. According to pgfsck my
complete database is fscked-up and no data comes out of the tool's
effort. That is, I have not yet tried to turn the hex strings into ascii.

> Hope this helps,

I guess I need to find out how to construct my own pg_control file ;)

Sander.
-- 
| If you look like your passport picture, you probably need the trip.
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8  9BDB D463 7E41 08CE C94D

In response to

pgsql-general by date

Next:From: Andrew RawnsleyDate: 2003-08-29 12:13:55
Subject: Re: erserver 1.2 problem
Previous:From: Steven TowerDate: 2003-08-29 11:37:55
Subject: Re: select taking forever

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group