Re: Idea: cross-check versions during initdb

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Idea: cross-check versions during initdb
Date: 2000-10-26 19:50:32
Message-ID: 200010261950.PAA01422@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Added to TODO:

* Prevent initdb from running wrong version of postmaster/postgres

> While answering the n'th why-is-initdb-failing question that looked like
> a version mismatch problem, it occurred to me to wonder why we don't
> make initdb verify that the executable and library files it's using
> are all from the same release it is. I think this would eliminate an
> installation mistake that's practically reached FAQ status.
>
> A sketch of a way to do this is:
>
> 1. Add a --version switch to postgres or postmaster to print its version
> and exit. Then initdb could check the executable's version against its
> own. (Alternatively we could rely on pg_config, but at a minimum that
> would mean checking to make sure that pg_config is found in the same
> directory that postgres is in. A direct check on the key executable
> seems a lot safer.)
>
> 2. During "make install", generate a PGVERSION file and store it in the
> same directory that global.bki etc are stored in (the .../share install
> directory). initdb could look for this to ensure that PGLIB is pointing
> to a compatible library directory. Alternatively, add version info as
> a comment in the first line of global.bki.
>
> I don't have time to pursue this right now, but maybe someone else would
> like to pick up on it.
>
> regards, tom lane
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2000-10-26 21:07:21 pgcrypto 0.2
Previous Message Bruce Momjian 2000-10-26 19:48:24 Re: 7.0 vs. 7.1 (was: latest version?)