pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_upgrade: Default new bindir to pg_upgrade location
Date: Sat, 27 Jul 2019 06:41:18 +0000
Message-ID: <E1hrGOM-0002Lu-K2@gemulon.postgresql.org> (raw)

pg_upgrade: Default new bindir to pg_upgrade location

Make the directory where the pg_upgrade binary resides the default for
new bindir, as running the pg_upgrade binary from where the new
cluster is installed is a very common scenario.  Setting this as the
defauly bindir for the new cluster will remove the need to provide it
explicitly via -B in many cases.

To support directories being missing from option parsing, extend the
directory check with a missingOk mode where the path must be filled at
a later point before being used.  Also move the exec_path check to
earlier in setup to make sure we know the new cluster bindir when we
scan for required executables.

This removes the exec_path from the OSInfo struct as it is not used
anywhere.

Author: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/9328.1552952117@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/959f6d6a1821b7d9068244f500dd80953e768d16

Modified Files
--------------
doc/src/sgml/ref/pgupgrade.sgml |  1 +
src/bin/pg_upgrade/option.c     | 22 ++++++++++++++--------
src/bin/pg_upgrade/pg_upgrade.c | 28 +++++++++++++++++-----------
src/bin/pg_upgrade/pg_upgrade.h |  1 -
src/bin/pg_upgrade/test.sh      |  2 +-
src/tools/msvc/vcregress.pl     |  2 +-
6 files changed, 34 insertions(+), 22 deletions(-)



Message-ID: <E1hrGOM-0002Lu-K2@gemulon.postgresql.org>
Permalink:  ../E1hrGOM-0002Lu-K2@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hrGOM-0002Lu-K2@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: pg_upgrade: Default new bindir to pg_upgrade location
  In-Reply-To: <E1hrGOM-0002Lu-K2@gemulon.postgresql.org>
  References: <E1hrGOM-0002Lu-K2@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox