Re: pg_upgrade: Make testing different transfer modes easier - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: pg_upgrade: Make testing different transfer modes easier
Date
Msg-id 4BB4EA0D-E818-4ECC-8041-4F46F7E63B30@yesql.se
Whole thread Raw
In response to RE: pg_upgrade: Make testing different transfer modes easier  ("Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi.shinoda@hpe.com>)
List pgsql-hackers
> 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/




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Error-safe user functions
Next
From: Michael Paquier
Date:
Subject: Re: [BUG] pg_upgrade test fails from older versions.