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-03T08:57:38Z
Lists: pgsql-hackers
On 02.03.21 22:51, Daniel Gustafsson wrote:
>> 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.
> 
> Reworded in the attached updated version.
> 
>> The name find_exec() seems not very accurate.  It doesn't find anything.  Maybe "check"?
> 
> I'm not wild about check_exec(), but every other name I could think of was
> drastically worse so I went with check_exec.
> 
>> I'm not sure why the new find_exec() adds EXE.  AFAIK, this is only required for stat(), and validate_exec() already does it.
> 
> Good point, fixed.

I committed this.  I added a pg_strip_crlf() so that there are no 
newlines in the error message.  I also slightly reworded the error 
message to make the found and expected value distinguishable.



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