Thread: Is initdb needed from 8.0.0rc3 to 8.0.0?

Is initdb needed from 8.0.0rc3 to 8.0.0?

From
Ron Mayer
Date:
Subject says it all.   I have a couple 8.0.0rc3 databases (about
1/2TB of GIS data and am upgrading to 8.0.0.  Note that I'll
dump&restore when PostGIS gets out of the release-candidate
cycle.  If I don't need an initdb I'll probably go to 8.0.0
now.   If I do need one I'd try keep running 8.0.0rc3 until
PostGIS 1.0 launches.

(unless someone here has better advice)

Re: Is initdb needed from 8.0.0rc3 to 8.0.0?

From
Michael Fuhr
Date:
On Tue, Jan 18, 2005 at 04:36:21PM -0800, Ron Mayer wrote:

> Subject says it all.

You can check if an upgrade requires an initdb by comparing catalog
versions between your current version and the new version.  To find
out your current catalog version, run pg_controldata and look for
the following line:

Catalog version number:   200411041

In the new version's source code look for the following line in
src/include/catalog/catversion.h:

#define CATALOG_VERSION_NO      200411041

If the catalog versions match then you shouldn't need to do an
initdb; if they're different then you will.  Making a full dump
anyway before upgrading might be prudent just in case, however.

The most recent catalog version change appears to have been committed
on 2004/11/05.  I think 8.0.0beta4 was the next version after that,
so if you're running 8.0.0beta4 or later then I wouldn't expect an
initdb to be required to move to 8.0.0.  But don't hold me to that....

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Re: Is initdb needed from 8.0.0rc3 to 8.0.0?

From
Tom Lane
Date:
Michael Fuhr <mike@fuhr.org> writes:
> If the catalog versions match then you shouldn't need to do an
> initdb; if they're different then you will.  Making a full dump
> anyway before upgrading might be prudent just in case, however.

> The most recent catalog version change appears to have been committed
> on 2004/11/05.  I think 8.0.0beta4 was the next version after that,
> so if you're running 8.0.0beta4 or later then I wouldn't expect an
> initdb to be required to move to 8.0.0.  But don't hold me to that....

This information is easy to discern from the cvsweb page for
catversion.h:
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h
which shows that versions older than beta5 will require an initdb.
(The apparent update on 12/31 was just to change the copyright-date
comment.)

            regards, tom lane