Re: Idea: cross-check versions during initdb

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Larry Rosenman <ler(at)lerctr(dot)org>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Idea: cross-check versions during initdb
Date: 2000-10-28 16:20:18
Message-ID: Pine.LNX.4.21.0010281757210.763-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane writes:

> Of course, people who manage to invoke a 6.5 or 7.0 initdb script aren't
> going to be helped anyway by defenses we put into 7.1 initdb :-(.

It just occured to me that people invoking pre-7.1 initdbs with new input
files are not going to get very far because the bki files have different
names now. They could still use a new backend with old bki files, though.
We could work around that if we subtly mangle the options set of
"postgres". For example, the -C option is pretty useless. Nobody cares
about vital pieces of information like

POSTGRES backend interactive interface
$Revision: 1.183 $ $Date: 2000/10/28 01:07:00 $

We could make postgres print a message like "Are you sure you're not
invoking me from an old initdb?" upon its receipt, since old initdb
versions pass this option.

As for "new initdb using old stuff", I'm putting a check into initdb for
`postgres --version`, which should make it safe. The danger of
accidentally using old bki files is not a problem at this point, but a
future version of genbki.sh might want to put a simple

# PostgreSQL 7.2

line atop its output files which initdb can check for. That should be
pretty low-interference.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-10-28 16:31:12 Re: Second proposal: what to do about INET/CIDR
Previous Message Dominic J. Eidson 2000-10-28 16:17:30 Re: Summary: what to do about INET/CIDR