Re: pg_combinebackup --copy-file-range

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Jakub Wartak <jakub.wartak@enterprisedb.com>, Peter Eisentraut <peter@eisentraut.org>, Michael Paquier <michael@paquier.xyz>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-03-31T01:56:06Z
Lists: pgsql-hackers
+            wb = copy_file_range(s->fd, &offsetmap[i], wfd, NULL, BLCKSZ, 0);

Can you collect adjacent blocks in one multi-block call?  And then I
think the contract is that you need to loop if it returns short.



Commits

  1. Allow using copy_file_range in write_reconstructed_file

  2. Allow copying files using clone/copy_file_range

  3. Align blocks in incremental backups to BLCKSZ

  4. Add --copy-file-range option to pg_upgrade.