pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Hannes Dorbath <light@theendofthetunnel.de>
Cc: pgsql-admin@postgresql.org
Subject: Re: Determine PG version used for initdb
Date: Wed, 20 Jul 2005 08:44:22 -0600
Message-ID: <20050720144422.GA43670@winnie.fuhr.org> (raw)
In-Reply-To: <42de4792$0$3604$8fe63b2a@news.disputo.net>
References: <42de4792$0$3604$8fe63b2a@news.disputo.net>

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/



view thread (12+ messages)  latest in thread

Message-ID: <20050720144422.GA43670@winnie.fuhr.org>
Permalink:  ../20050720144422.GA43670@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050720144422.GA43670@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mike@fuhr.org, light@theendofthetunnel.de
  Subject: Re: Determine PG version used for initdb
  In-Reply-To: <20050720144422.GA43670@winnie.fuhr.org>
  References: <42de4792$0$3604$8fe63b2a@news.disputo.net> <20050720144422.GA43670@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox