Re: Determine PG version used for initdb - Mailing list pgsql-admin

From Michael Fuhr
Subject Re: Determine PG version used for initdb
Date
Msg-id 20050720144422.GA43670@winnie.fuhr.org
Whole thread Raw
In response to Determine PG version used for initdb  (Hannes Dorbath <light@theendofthetunnel.de>)
List pgsql-admin
On Wed, Jul 20, 2005 at 03:21:42PM +0200, Hannes Dorbath wrote:
> Is it possible to determine if PG 8.0.1's initdb or PG 8.0.3's initdb
> was used to init a cluster? I fear I am accidental running a 8.0.1
> postmaster on a 8.0.3 cluster due to wrong env vars :(

That shouldn't matter -- the postmaster will refuse to start if it
doesn't like the catalog version; otherwise you should be okay.

In general you don't have to initdb when upgrading to a new point
release, and the Release Notes should tell you if it's necessary
or not.  Sometimes an initdb might be desirable, however, to fix
certain catalog problems -- this is the case with 8.0.3, for example.
If you don't want to initdb then there's a manual fix procedure:

http://www.postgresql.org/docs/8.0/static/release.html#RELEASE-8-0-3

I think the following query shows the version of initdb that
initialized the cluster, but somebody please correct me if I'm
mistaken:

SELECT character_value
FROM information_schema.sql_implementation_info
WHERE implementation_info_name = 'DBMS VERSION';

The value displayed appears to have been created by set_info_version()
in initdb.c.

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

pgsql-admin by date:

Previous
From: "Joel Fradkin"
Date:
Subject: Re: Determine PG version used for initdb
Next
From: Hannes Dorbath
Date:
Subject: Re: Determine PG version used for initdb