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