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

Re: Determine PG version used for initdb

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Hannes Dorbath <light(at)theendofthetunnel(dot)de>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Determine PG version used for initdb
Date: 2005-07-20 14:44:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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:

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

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

In response to

pgsql-admin by date

Next:From: Hannes DorbathDate: 2005-07-20 14:51:44
Subject: Re: Determine PG version used for initdb
Previous:From: Joel FradkinDate: 2005-07-20 14:33:53
Subject: Re: Determine PG version used for initdb

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