Re: Forgot to dump old data before re-installing machine
От | Stefan Schwarzer |
---|---|
Тема | Re: Forgot to dump old data before re-installing machine |
Дата | |
Msg-id | DB57A32D-EB62-450C-8D6E-B8A8D595BCF8@grid.unep.ch обсуждение исходный текст |
Ответ на | Re: Forgot to dump old data before re-installing machine (Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>) |
Ответы |
Re: Forgot to dump old data before re-installing machine
|
Список | 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... 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
В списке pgsql-general по дате отправления: