Re: [HACKERS] v10 pg_ctl compatibility

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] v10 pg_ctl compatibility
Дата
Msg-id 11828.1506454839@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] v10 pg_ctl compatibility  (Andres Freund <andres@anarazel.de>)
Ответы Re: [HACKERS] v10 pg_ctl compatibility  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2017-09-26 11:59:42 -0700, Jeff Janes wrote:
>> I don't know if cross-version use of pg_ctl restart was ever officially
>> supported, but the current behavior is rather confusing (waiting for a long
>> time, and then reporting failure, even though it started successfully).

> I'm actually tempted to just make pg_ctl verify the right version of
> postgres is being used. Maybe I'm missing something, but what's the
> use-case for allowing it, and every couple releases have some breakage?

At a high level the use case is
yum upgrade postgresqlservice postgresql restart

In practice, that wouldn't work across a major-version upgrade anyway,
because of data directory incompatibility.  It should work for minor
versions though, so the version check couldn't be strict.

I'm not really feeling the need to insert a version check though.
It seems like it's more likely to reject cases that would have worked
than to do anything helpful.  The API that pg_ctl relies on is one
that we don't change very often, viz the contents of postmaster.pid.
The fact that we did change it this time is the source of Jeff's
surprise.

Also, what would you check exactly?  Inquiring into what
"postgres --version" returns is not very conclusive about what is
actually running in the data directory pg_ctl has been pointed at.
        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] [BUGS] BUG #14825: enum type: unsafe use?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] v10 pg_ctl compatibility