Re: pg_upgrade version checking questions

Bruce Momjian <bruce@momjian.us>

From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org, Tomasz Szypowski <tomasz.szypowski@gmail.com>
Date: 2019-03-19T06:55:30Z
Lists: pgsql-hackers
On Tue, Mar 19, 2019 at 02:43:49AM -0400, Bruce Momjian wrote:
> > 3. Actually, I'm kind of wondering why pg_upgrade has a --new-bindir
> > option at all, rather than just insisting on finding the new-version
> > executables in the same directory it is in.  This seems like, at best,
> > a hangover from before it got into core.  Even if you don't want to
> > remove the option, we could surely provide a useful default setting
> > based on find_my_exec.  (I'm amused to notice that pg_upgrade
> > currently takes the trouble to find out its own path, and then does
> > precisely nothing with the information.)
> 
> Good point.  You are right that when it was outside of the source tree,
> and even in /contrib, that would not have worked easily.  Makes sense to
> at least default to the same directory as pg_upgrade.

I guess an open question is whether we should remove the --new-bindir
option completely.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


Commits

  1. pg_upgrade: Check version of target cluster binaries

  2. pg_upgrade: Default new bindir to pg_upgrade location

  3. pg_upgrade: Check all used executables