From gwilk@ellacoya.com Fri Jul 27 14:49:43 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id E45A79FB5D0 for ; Fri, 27 Jul 2007 11:49:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 57378-02 for ; Fri, 27 Jul 2007 11:49:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail02.ellacoya.com (67-135-29-172.dia.static.qwest.net [67.135.29.172]) by postgresql.org (Postfix) with ESMTP id BF2749FB540 for ; Fri, 27 Jul 2007 11:49:35 -0300 (ADT) Received: from YZANGXP ([192.168.124.31]) by mail02.ellacoya.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 27 Jul 2007 10:49:33 -0400 From: "George Wilk" To: Cc: "'Gez Saunders'" Subject: Checking database version Date: Fri, 27 Jul 2007 10:49:30 -0400 Message-ID: <02b201c7d05d$56cf9890$1f7ca8c0@ellacoya.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_02B3_01C7D03B.CFBDF890" X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Thread-Index: AcfQXVanZV9xwJEgT8qiR9bn5Arcew== X-OriginalArrivalTime: 27 Jul 2007 14:49:33.0570 (UTC) FILETIME=[5852B620:01C7D05D] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-5.000.1021-15324.003 X-TM-AS-Result: No--6.603300-4.000000-1 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/310 X-Sequence-Number: 26291 This is a multi-part message in MIME format. ------=_NextPart_000_02B3_01C7D03B.CFBDF890 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Is there a reliable way of verifying version of the database by looking at the PGDATA directory? Let me explain why this is important in our case. Originally, our product utilized version 8.1 of Postgres. We have since moved on to version 8.2. Our existing customer base will need to be upgraded to version 8.2 as well. There might be legitimate cases where our customers might be running other software products on their systems, which utilize earlier versions of Postgres, therefore we cannot uninstall earlier packages and install ours indiscriminately. Our install scripts must reliably determine if the database files related to our product need to be upgraded or not, before installing Postgres 8.2 package, performing dump, etc. What I'm looking for is a sure way of determining version of Postgres based on the files contained in a specific PGDATA location. Is it possible, and if so how can it be done? Thanks in advance, ~george ------=_NextPart_000_02B3_01C7D03B.CFBDF890 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Is there a reliable way of verifying version of the = database by looking at the PGDATA directory?

 

Let me explain why this is important in our = case.  Originally, our product utilized version 8.1 of Postgres.  We have since moved = on to version 8.2.  Our existing customer base will need to be upgraded = to version 8.2 as well.  There might be legitimate cases where our = customers might be running other software products on their systems, which utilize = earlier versions of Postgres, therefore we cannot uninstall earlier packages and install ours indiscriminately.  Our install scripts must reliably determine if the database files related to our product need to be = upgraded or not, before installing Postgres 8.2 package, performing dump, = etc.

 

What I’m looking for is a sure way of = determining version of Postgres based on the files contained in a specific PGDATA = location.  Is it possible, and if so how can it be = done?

 

Thanks in advance,

~george

------=_NextPart_000_02B3_01C7D03B.CFBDF890-- From rabroersma@yahoo.com Fri Jul 27 15:19:13 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 736309FB36E for ; Fri, 27 Jul 2007 12:19:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 71366-08 for ; Fri, 27 Jul 2007 12:19:09 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from web31813.mail.mud.yahoo.com (web31813.mail.mud.yahoo.com [68.142.207.76]) by postgresql.org (Postfix) with SMTP id 978E39FB2E0 for ; Fri, 27 Jul 2007 12:19:09 -0300 (ADT) Received: (qmail 38508 invoked by uid 60001); 27 Jul 2007 15:19:08 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=fGe6IWdcgLZpfB+nUwww8S+MQ8vf4bMm0j3JnvabBM9ZHkaR3SnwG6W6sBPSBpT1N7GTiexYVLMec4e5rqo3TykR4HQdzosZqj6tLfkyHRXrncrny3vgPO7oYKFkRGFm8zykcmfy+3/Wg+bYBq8S0CWy01z1FwCHETL3aI/0V1M=; X-YMail-OSG: 9HvhNroVM1lJgeLA2jBznkIYB9zLRzis5KUk1Ol8Z9Ov7kn8foN8OlycBxae7Uaamw-- Received: from [12.180.237.138] by web31813.mail.mud.yahoo.com via HTTP; Fri, 27 Jul 2007 08:19:08 PDT Date: Fri, 27 Jul 2007 08:19:08 -0700 (PDT) From: Richard Broersma Jr Subject: Re: Checking database version To: George Wilk , pgsql-admin@postgresql.org Cc: 'Gez Saunders' In-Reply-To: <02b201c7d05d$56cf9890$1f7ca8c0@ellacoya.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <18690.38256.qm@web31813.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.126 tagged_above=0 required=5 tests=AWL=0.125, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200707/312 X-Sequence-Number: 26293 --- George Wilk wrote: > Is there a reliable way of verifying version of the database by looking at > the PGDATA directory? Does the file "PG_VERSION" not tell what you need? Regards, Richard Broersma Jr. From Kevin.Grittner@wicourts.gov Fri Jul 27 15:20:27 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 7F33C9FB672 for ; Fri, 27 Jul 2007 12:20:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 74423-03-2 for ; Fri, 27 Jul 2007 12:20:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by postgresql.org (Postfix) with ESMTP id 134EE9FB6CD for ; Fri, 27 Jul 2007 12:20:22 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Fri, 27 Jul 2007 10:20:21 -0500 Message-Id: <46A9C6DF.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.2 Date: Fri, 27 Jul 2007 10:20:16 -0500 From: "Kevin Grittner" To: "George Wilk" , Cc: "'Gez Saunders'" Subject: Re: Checking database version References: <02b201c7d05d$56cf9890$1f7ca8c0@ellacoya.com> In-Reply-To: <02b201c7d05d$56cf9890$1f7ca8c0@ellacoya.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/313 X-Sequence-Number: 26294 >>> On Fri, Jul 27, 2007 at 9:49 AM, in message <02b201c7d05d$56cf9890$1f7ca8c0@ellacoya.com>, "George Wilk" wrote:=20 > Is there a reliable way of verifying version of the database by looking = at > the PGDATA directory? =20 Could you use the first couple lines of output from pg_controldata? =20 -Kevin =20 From gwilk@ellacoya.com Fri Jul 27 15:43:28 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id BF8C09FB68E for ; Fri, 27 Jul 2007 12:43:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 53932-10 for ; Fri, 27 Jul 2007 12:43:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail02.ellacoya.com (67-135-29-172.dia.static.qwest.net [67.135.29.172]) by postgresql.org (Postfix) with ESMTP id C15949FB30D for ; Fri, 27 Jul 2007 12:43:24 -0300 (ADT) Received: from YZANGXP ([192.168.124.31]) by mail02.ellacoya.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 27 Jul 2007 11:43:23 -0400 From: "George Wilk" To: "'Richard Broersma Jr'" , Subject: Re: Checking database version Date: Fri, 27 Jul 2007 11:43:20 -0400 Message-ID: <02c801c7d064$dbe8e9d0$1f7ca8c0@ellacoya.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Thread-Index: AcfQYX67kPGWVeFaRm+HJLapP1KlAwAARpeg In-Reply-To: <18690.38256.qm@web31813.mail.mud.yahoo.com> X-OriginalArrivalTime: 27 Jul 2007 15:43:23.0304 (UTC) FILETIME=[DD650280:01C7D064] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-5.000.1021-15324.003 X-TM-AS-Result: No--4.725600-4.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/314 X-Sequence-Number: 26295 Yes, it does. However, in one test case after running dump, restoring, and upgrading to 8.2 the PG_VERSION was still showing 8.1. This could have been a result of us monkeying around, but still I wasn't sure when the PG_VERSION was being updated, and whether it provided reliable source of versioning information. -----Original Message----- From: Richard Broersma Jr [mailto:rabroersma@yahoo.com] Sent: Friday, July 27, 2007 11:19 AM To: George Wilk; pgsql-admin@postgresql.org Cc: 'Gez Saunders' Subject: Re: [ADMIN] Checking database version --- George Wilk wrote: > Is there a reliable way of verifying version of the database by looking at > the PGDATA directory? Does the file "PG_VERSION" not tell what you need? Regards, Richard Broersma Jr.