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: Christoph Berg <myon@debian.org>, Tom Lane <tgl@sss.pgh.pa.us>,
"pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>,
Tomasz Szypowski <tomasz.szypowski@gmail.com>
Date: 2019-07-24T20:32:05Z
Lists: pgsql-hackers
On 2019-07-23 17:30, Daniel Gustafsson wrote: > The reason for moving is that we print default values in usage(), and that > requires the value to be computed before calling usage(). We already do this > for resolving environment values in parseCommandLine(). If we do it in setup, > then we’d have to split out resolving the new_cluster.bindir into it’s own > function exposed to option.c, or do you have any other suggestions there? I think doing nontrivial work in order to print default values in usage() is bad practice, because in unfortunate cases it would even prevent you from calling --help. Also, in this case, it would probably very often exceed the typical line length of --help output and create some general ugliness. Writing something like "(default: same as this pg_upgrade)" would probably achieve just about the same. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
pg_upgrade: Check version of target cluster binaries
- f06b1c598254 14.0 landed
-
pg_upgrade: Default new bindir to pg_upgrade location
- 959f6d6a1821 13.0 landed
-
pg_upgrade: Check all used executables
- 0befb4f31386 13.0 landed