Re: two issues with v12 beta3 - Mailing list pgsql-pkg-yum

From Justin Pryzby
Subject Re: two issues with v12 beta3
Date
Msg-id 20190822174745.GH15332@telsasoft.com
Whole thread Raw
In response to Re: two issues with v12 beta3  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: two issues with v12 beta3  (Justin Pryzby <pryzby@telsasoft.com>)
List 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 by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: two issues with v12 beta3
Next
From: "Burke, Carl D."
Date:
Subject: Repo directory in RPM for CentOS 7.6 does not exist