Re: two issues with v12 beta3

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Devrim Gündüz <devrim(at)gunduz(dot)org>
Cc: pgsql-pkg-yum(at)postgresql(dot)org
Subject: Re: two issues with v12 beta3
Date: 2019-08-22 17:47:45
Message-ID: 20190822174745.GH15332@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message Burke, Carl D. 2019-08-23 18:26:59 Repo directory in RPM for CentOS 7.6 does not exist
Previous Message Justin Pryzby 2019-08-22 16:21:21 Re: two issues with v12 beta3