Re: add --transfer-mode to pg_upgrade

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: add --transfer-mode to pg_upgrade
Date: 2026-12-03 16:07:50
Message-ID: 15efd914-15a6-4b66-ae3b-c7407a9855aa@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/12/2026 18:01, Nathan Bossart wrote:
> pg_upgrade has a separate option for each of its file transfer modes
> (--clone, --copy, --copy-file-range, --link, and --swap), which I find
> somewhat silly given only one mode can be used at a time. The options are
> scattered around the documentation and the --help output, and every new
> mode means yet another one (I'm guilty of adding the most recent). ISTM we
> ought to combine them.
>
> The attached patch adds --transfer-mode, which accepts the mode as its
> argument (e.g., --transfer-mode=link). The documentation for each mode
> moves to the new option, and the existing options are now listed as
> deprecated spellings of it. They continue to work as before, and I doubt
> we'll ever be able to remove them, but IMHO this is still an improvement.

+1. I didn't read the patch, but I like the idea.

I hope we don't add too many more transfer modes for this to become a
huge problem, but IMO --transfer-mode=<mode> just reads nicer.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Nathan Bossart 2026-12-03 16:01:34 add --transfer-mode to pg_upgrade