Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux