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

Поиск
Список
Период
Сортировка
От Stefan Schwarzer
Тема Re: Forgot to dump old data before re-installing machine
Дата
Msg-id 75D2A89C-1822-474C-A8C7-31C601FC4E0D@grid.unep.ch
обсуждение исходный текст
Ответ на Re: Forgot to dump old data before re-installing machine  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Forgot to dump old data before re-installing machine  (Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>)
Список pgsql-general
>> 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...

Stef



В списке pgsql-general по дате отправления:

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: an simple way to get count of SQL statements per some interval
Следующее
От: "T.J. Adami"
Дата:
Сообщение: Re: backup and restore