X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A0EBB52914 for ; Wed, 20 Jul 2005 11:44:23 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 87036-07 for ; Wed, 20 Jul 2005 14:44:22 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id E2319528C6 for ; Wed, 20 Jul 2005 11:44:21 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j6KEiMqu016397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 20 Jul 2005 08:44:24 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j6KEiMwT043782; Wed, 20 Jul 2005 08:44:22 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j6KEiMxV043781; Wed, 20 Jul 2005 08:44:22 -0600 (MDT) (envelope-from mfuhr) Date: Wed, 20 Jul 2005 08:44:22 -0600 From: Michael Fuhr To: Hannes Dorbath Cc: pgsql-admin@postgresql.org Subject: Re: Determine PG version used for initdb Message-ID: <20050720144422.GA43670@winnie.fuhr.org> References: <42de4792$0$3604$8fe63b2a@news.disputo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42de4792$0$3604$8fe63b2a@news.disputo.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/161 X-Sequence-Number: 18217 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/