Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

How to start my 9.2 data directory using an 8.4 server?

$
0
0

I have an old version of postgres (8.4.13) that doesn’t run for various reasons. I plan to move the database files in there to a new install of postgres 9.3. How would I go about doing this? For one I can not start up postgres when I run:

postgres -D /var/lib/pgsql/9.2/data

As I get :

FATAL:  database files are incompatible with server
DETAIL:  The data directory was initialized by PostgreSQL version 9.2, which is not compatible with this version 8.4.13.

The easiest route would be to figuring out how to run this server but if not how would I locate the db files in it?

EDIT:

How this actually happened was last week I wanted to intiliaze postgres server commands so I could easily stop and restart the server since my knowledge of postgresql is pretty limited. I ended up installing postgresql-server for RHEL and it was initially working fine. The commands weren’t working so I forgot about it. The databases were working fine too at that time. I log on today and to my shock the commands were working but it also wiped the dbs. So my presumption is it installed a completely new server that could be accessed via the commands.

Somehow this tampered whatever settings I had.

Typing postgresql –version gives me version 8.4.13.
If I can only start it now by pointing postgres -D to the correct pgsql.

There are two pgsql dirs:

/var/lib/pgsql/9.2/data
/var/lib/pgsql/data

The latter seems to be the newest install of postgresql as the pg_hba.conf files are unedited.

I used to be able to start the 8.4.13 server with 9.2 it would just give me a WARNING: Some features might not be available. I don’t know why installing postgresql-server would change this now. As they are separate dirs.


Viewing all articles
Browse latest Browse all 1138

Trending Articles