> On 19 Dec 2022, at 01:39, Shinoda, Noriyoshi (PN Japan FSIP) <noriyoshi.shinoda@hpe.com> wrote:
> With the addition of --copy option, pg_upgrade now has three possible transfer mode options. Currently, an error does
notoccur even if multiple transfer modes are specified. For example, we can also run "pg_upgrade --link --copy --clone"
command.As discussed in Horiguchi-san's previous email, options like "--mode=link|copy|clone" can prevent this problem.
> The attached patch uses the current implementation and performs a minimum check to prevent multiple transfer modes
frombeing specified.
We typically allow multiple invocations of the same parameter with a
last-one-wins strategy, and only error out when competing *different*
parameters are present. A --mode=<string> parameter can still be added as
syntactic sugar, but multiple-choice parameters is not a commonly used pattern
in postgres utilities (pg_dump/restore and pg_basebackup are ones that come to
mind).
--
Daniel Gustafsson https://vmware.com/