Skip site navigation (1) Skip section navigation (2)

7.3.9 Install Question - init.d/postgresql error?

From: Dianne Chen <diana_chen23(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: 7.3.9 Install Question - init.d/postgresql error?
Date: 2005-05-02 16:28:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general

I have just installed postgresql 7.3.9 into a RHEL3.0
environment. The install went fine. I went to start
the postgresql server in the "service configuration"
box, and that went well. The problem happened when I
went to restart the server. I got the bad error:

An old version of the database format was found.\nYou
need to upgrade the data format before using
PostgreSQL.\nSee (Your System's documentation
directory)/postgresql-7.4/README.rpm-dist for more

Note the incorrect postgresql-7.4 reference...

I think I found the reason for it - I just do not know
the proper solution.

On the initial postgresql start, a database is created
in /var/lib/pgsql/data, and a file called PG_VERSION
is created - its contents are "7.3". This is proper.

On restart, since the database now exists, the file
/etc/rc.d/init.d/postgresql calls stop(), then
start(). The start() routine verifies the existense of
the PG_VERSION file and the data directory before it
continues (is database there?). Since they are both
there, the script then cats the contents of the
PG_VERSION file and compares it to the script variable
$PGVERSION, which is set to 7.4 in the very first line
of the script. Note the catfile contents of 7.3 does
not compare to the program value of 7.4 so it will
ALWAYS error after the successful creation of a
database when requested to restart.

Q: Is it proper to simply change the 7.4 value in the
script to 7.3?  Other users have recently posted to
this list with similar errors, and were told to scrub
out old data directory. I suspect they will have same

Q: I bet this problem is only for 7.3/7.4 users?

Thank you for any verification of fix procedure.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 


pgsql-general by date

Next:From: David WheelerDate: 2005-05-02 16:28:56
Subject: Re: [Dbdpg-general] Re: 'prepare' is not quite schema-safe
Previous:From: David WheelerDate: 2005-05-02 16:24:48
Subject: Re: [Dbdpg-general] Re: 'prepare' is not quite schema-safe

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group