Re: Forgot to dump old data before re-installing machine

From: Stefan Schwarzer <stefan(dot)schwarzer(at)grid(dot)unep(dot)ch>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Forgot to dump old data before re-installing machine
Date: 2008-01-16 11:26:00
Message-ID: DB57A32D-EB62-450C-8D6E-B8A8D595BCF8@grid.unep.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches


>>> Ok, did what you said: stopping server, deleting "newly" created
>>> "data" directory, re-running initdb, starting the server, stopping
>>> the
>>> server.
>>
>>> Renamed "empty" data directory.
>>
>>> Restarting server: NOT COMPLAINING "you need to run initdb" or
>>> something else.... Although it's saying that it starts, nothing
>>> appears in the process list (ps -ef).
>>
>> Hmm, you need to stop here and figure out exactly what happens.
>>
>> What procedure are you using to start the server? I assume you
>> are not directly typing "postmaster", but using some script,
>> because the bare postmaster would certainly not act that way.
>> I guess that either the script silently runs initdb for you
>> (which is generally thought a bad idea nowadays) or that it
>> is redirecting the postmaster's log output someplace that you're
>> not looking. Anyway, don't go past this step until you understand
>> what you're seeing.
>
>
> Uff....
>
> Ok, here is what I did after "compiling" postgres8.1 (getting it
> from MacPorts):
>
> /opt/local/lib/postgresql81/bin/initdb -D Documents/data_postgres
> /opt/local/lib/postgresql81/bin/pg_ctl -D Documents/data_postgres -l
> logfile start
> ps -ef shows the postmaster process
> /opt/local/lib/postgresql81/bin/pg_ctl -D Documents/data_postgres -l
> logfile stop
> renaming "data_postgres" to "data_postgres.orig"
> /opt/local/lib/postgresql81/bin/pg_ctl -D Documents/data_postgres -l
> logfile start
> which tells me:
> postmaster starting
> but in ps -ef there is no process listed
>
> When I re-rename the newly created folder (data_postgres.orig into
> data_postgres) the "start" works again. But it does not work with
> the "old" (backuped) data folder...
>
> So, as I mentioned before, it seems not to be that simple, that I
> can just copy the "old" (backuped) data folder onto the newly created.
>
> Is there any way I can figure out with which version I have created
> the "old" databases? Perhaps, in a "worst" case scenario they have
> been created in 8.0.... I will try...

The logfile is telling me this when I try to start the server with my
"old" data folder:

FATAL: database files are incompatible with server
DETAIL: The database cluster was initialized with PG_CONTROL_VERSION
738394112, but the server was compiled with PG_CONTROL_VERSION 812.

What does it mean? I have and had 8.1 installed...

Thanks for any help!!

Stef

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message João Paulo Zavanela 2008-01-16 12:09:13 Re: Search connections created per day
Previous Message Richard Huxton 2008-01-16 11:25:59 Re: INSERT with a composite columnt from query

Browse pgsql-patches by date

  From Date Subject
Next Message Thomas Pundt 2008-01-16 13:02:14 Re: Forgot to dump old data before re-installing machine
Previous Message Alvaro Herrera 2008-01-15 23:01:24 Re: 8.3-beta4, analyze and db owner