pgsql: Add --copy-file-range option to pg_upgrade.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add --copy-file-range option to pg_upgrade.
Date: 2024-03-05 23:04:01
Message-ID: E1rhdpJ-002HuY-7A@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

The copy_file_range() system call is available on at least Linux and
FreeBSD, and asks the kernel to use efficient ways to copy ranges of a
file. Options available to the kernel include sharing block ranges
(similar to --clone mode), and pushing down block copies to the storage
layer.

For automated testing, see PG_TEST_PG_UPGRADE_MODE. (Perhaps in a later
commit we could consider setting this mode for one of the CI targets.)

Reviewed-by: Peter Eisentraut <peter(at)eisentraut(dot)org>
Discussion: https://postgr.es/m/CA%2BhUKGKe7Hb0-UNih8VD5UNZy5-ojxFb3Pr3xSBBL8qj2M2%3DdQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d93627bcbe5001750e7611f0e637200e2d81dcff

Modified Files
--------------
configure | 2 +-
configure.ac | 1 +
doc/src/sgml/ref/pgupgrade.sgml | 13 +++++++
meson.build | 1 +
src/bin/pg_upgrade/TESTING | 4 +-
src/bin/pg_upgrade/check.c | 3 ++
src/bin/pg_upgrade/file.c | 78 ++++++++++++++++++++++++++++++++++++++
src/bin/pg_upgrade/option.c | 7 +++-
src/bin/pg_upgrade/pg_upgrade.h | 4 ++
src/bin/pg_upgrade/relfilenumber.c | 8 ++++
src/include/pg_config.h.in | 3 ++
11 files changed, 120 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2024-03-06 05:44:02 pgsql: Add recovery TAP test for race condition with slot invalidations
Previous Message David Rowley 2024-03-05 21:57:59 pgsql: Remove surplus trailing semicolon