Обсуждение: Data directory was initialized by PostgreSQL version 8.3

Поиск
Список
Период
Сортировка

Data directory was initialized by PostgreSQL version 8.3

От
"Phillip Smith"
Дата:
Hi All,

Just tried to recompile (what I thought!) was the same version of PG that I
already had running, to add in the AdminPack to stop pgAdmin complaining
about it being missing.

After recompiling from source, with the Admin Pack (did it on a devel box
first to make sure I was doing the right thing), I did the following:
1. Shutdown PostgreSQL
2. 'gmake install' the recompiled version (same -prefix = /usr/local/pg-8.2)
3. Restart PostgreSQL

Now PostgreSQL complains at me with the following error:
2007-07-25 11:52:05 EST @ []DETAIL:  The data directory was initialized by
PostgreSQL version 8.3, which is not compatible with this version 8.2.4.

As far as I'm aware, 8.3 doesn't exist! The latest version on the
postgresql.org website is 8.2.4

I'm assuming the problem is because the PG_VERSION file in the data
directory says 8.3, so I'm making a copy of the directory, changing that to
8.2 and see if it will start with that.

I can initialize a new data directory and restore last nights backup, but
I'd rather not have to loose everything that's happened in the last 4 hours.

Any advice on what's going on?

Cheers,
~p


*******************Confidentiality and Privilege Notice*******************

The material contained in this message is privileged and confidential to
the addressee.  If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.

Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments

THINK BEFORE YOU PRINT - Save paper if you don't really need to print this
e-mail.

Re: Data directory was initialized by PostgreSQL version 8.3

От
"Phillip Smith"
Дата:
> I'm assuming the problem is because the PG_VERSION file in the data
> directory says 8.3, so I'm making a copy of the directory, changing that
to
> 8.2 and see if it will start with that.

Well that didn't work!
[postgres@stirling pgData-8.2]$ pg_ctl -o '-i' start
server starting
2007-07-25 12:13:25 EST @ []FATAL:  database files are incompatible with
server
2007-07-25 12:13:25 EST @ []DETAIL:  The database cluster was initialized
with PG_CONTROL_VERSION 831, but the server was compiled with
PG_CONTROL_VERSION 822.
2007-07-25 12:13:25 EST @ []HINT:  It looks like you need to initdb.


*******************Confidentiality and Privilege Notice*******************

The material contained in this message is privileged and confidential to
the addressee.  If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.

Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments

THINK BEFORE YOU PRINT - Save paper if you don't really need to print this
e-mail.

Re: Data directory was initialized by PostgreSQL version 8.3

От
Tom Lane
Дата:
"Phillip Smith" <phillip.smith@weatherbeeta.com.au> writes:
> Now PostgreSQL complains at me with the following error:
> 2007-07-25 11:52:05 EST @ []DETAIL:  The data directory was initialized by
> PostgreSQL version 8.3, which is not compatible with this version 8.2.4.

> As far as I'm aware, 8.3 doesn't exist!

You seem to have pulled a development snapshot from someplace ...

> I'm assuming the problem is because the PG_VERSION file in the data
> directory says 8.3, so I'm making a copy of the directory, changing that to
> 8.2 and see if it will start with that.

There is exactly 0 chance that that will work.  The PG_VERSION test is
there to save you from worse and more obscure failures involving
incompatible system catalog layouts.

            regards, tom lane

Re: Data directory was initialized by PostgreSQL version 8.3

От
"Phillip Smith"
Дата:
"Phillip Smith" <phillip.smith@weatherbeeta.com.au> writes:
>> Now PostgreSQL complains at me with the following error:
>> 2007-07-25 11:52:05 EST @ []DETAIL:  The data directory was initialized
by
>> PostgreSQL version 8.3, which is not compatible with this version 8.2.4.

>> As far as I'm aware, 8.3 doesn't exist!

> You seem to have pulled a development snapshot from someplace ...

Thanks Tom... I recall you giving me a patch for an error I was having when
I first upgraded to 8.2 but I can't for the life of me remember the error.

Is it worth me trying to fix this stuff up on my behalf? Or should I just go
back to last night's backup and recreate this morning's transactions?


*******************Confidentiality and Privilege Notice*******************

The material contained in this message is privileged and confidential to
the addressee.  If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.

Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments

THINK BEFORE YOU PRINT - Save paper if you don't really need to print this
e-mail.

Re: Data directory was initialized by PostgreSQL version 8.3

От
Tom Lane
Дата:
"Phillip Smith" <phillip.smith@weatherbeeta.com.au> writes:
>>> 2007-07-25 11:52:05 EST @ []DETAIL:  The data directory was initialized
>>> by
>>> PostgreSQL version 8.3, which is not compatible with this version 8.2.4.

> Is it worth me trying to fix this stuff up on my behalf? Or should I just go
> back to last night's backup and recreate this morning's transactions?

If you can reinstall the server software you had yesterday, do that and
do a pg_dumpall, then install 8.2.4, initdb, reload from dump.

            regards, tom lane