Re: pg_upgrade version checking questions

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-03-02T13:20:40Z
Lists: pgsql-hackers
On 23.02.21 17:14, Daniel Gustafsson wrote:
> This exports validate_exec to reduce duplication, and implements a custom
> find_other_exec-like function in pg_upgrade to check each binary for the
> version number.  Keeping a local copy of validate_exec is easy to do if it's
> deemed not worth it to export it.

This looks mostly okay to me.

The commit message says something about "to ensure the health of the 
target cluster", which doesn't make sense to me.  Maybe find a better 
wording.

The name find_exec() seems not very accurate.  It doesn't find anything. 
  Maybe "check"?

I'm not sure why the new find_exec() adds EXE.  AFAIK, this is only 
required for stat(), and validate_exec() already does it.




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