Re: Idea: cross-check versions during initdb

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Idea: cross-check versions during initdb
Дата
Msg-id Pine.LNX.4.21.0010281757210.763-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: Idea: cross-check versions during initdb  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Idea: cross-check versions during initdb  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@gmx.net       http://yi.org/peter-e/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Gram.y patches for better parenthesis handling.
Следующее
От: Larry Rosenman
Дата:
Сообщение: Re: Gram.y patches for better parenthesis handling.