| From: | "Xueyu Gao" <gaoxueyu_hope(at)163(dot)com> |
|---|---|
| To: | "Heikki Linnakangas" <hlinnaka(at)iki(dot)fi> |
| Cc: | "Nathan Bossart" <nathandbossart(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re:Re: add --transfer-mode to pg_upgrade |
| Date: | 2026-12-04 00:34:09 |
| Message-ID: | bb3bd40.471.1a23e790abc.Coremail.gaoxueyu_hope@163.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
At 2026-12-04 00:07:50, "Heikki Linnakangas" <hlinnaka(at)iki(dot)fi> wrote:
>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
>
>
Hi Nathan,
I reviewed and tested the patch. The new option maps to the existing transfer-mode values and reuses the existing checks and transfer logic. I did
not find any blocking correctness issues.
Just one piece of comment:
The help output loses the indication that copy is the default. Previously, the --copy description included “(default)”, but neither its
replacement nor the new --transfer-mode description includes that information. Could we add it to the new option’s description? The documentation
already preserves it.
Thanks,
Xueyu Gao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-12-04 00:37:00 | Re: pg_receivewal doesn't truncate compressed WAL files on restart |
| Previous Message | Masahiko Sawada | 2026-12-04 00:29:37 | Re: [PG19] pg_signal_autovacuum_worker can't signal parallel autovacuum workers |