Re: two issues with v12 beta3

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: two issues with v12 beta3
Дата
Msg-id 20190822174745.GH15332@telsasoft.com
обсуждение исходный текст
Ответ на Re: two issues with v12 beta3  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: two issues with v12 beta3  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-pkg-yum
On Thu, Aug 22, 2019 at 11:21:21AM -0500, Justin Pryzby wrote:
> And, you could do:
> PGPREVMAJORVERSION=$((PGMAJORVERSION-1))

I take that back; PGPREVMAJORVERSION is used for the upgrade path (which I've
never used).

The prior version could be anything since 8.4, since it's allowed to pg_upgrade
to "skip across" major versions (like from 9.6 to 11).

So it should either be configurable, with a default, like:
# Assign previous major version from current version if not set in environment:
: ${PGPREVMAJORVERSION:=$((PGMAJORVERSION-1))}

Or otherwise it should be detected, perhaps like:
# Should run as user: postgres
psql postgres -Atc "SELECT current_setting('server_version')"
12beta2

Also, I noticed in the upgrade case the initscript says "su" instead of $SU.

Justin



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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: two issues with v12 beta3
Следующее
От: "Burke, Carl D."
Дата:
Сообщение: Repo directory in RPM for CentOS 7.6 does not exist