aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2024-03-06 11:39:50 +1300
committerThomas Munro <tmunro@postgresql.org>2024-03-06 12:01:01 +1300
commitd93627bcbe5001750e7611f0e637200e2d81dcff (patch)
tree3ee757589d5c5f9eb3d40c0dc788133cd5614343 /doc/src
parent2bce0ad67f93af6d1889ec611a8f618245291e3f (diff)
downloadpostgresql-d93627bcbe5001750e7611f0e637200e2d81dcff.tar.gz
postgresql-d93627bcbe5001750e7611f0e637200e2d81dcff.zip
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@eisentraut.org> Discussion: https://postgr.es/m/CA%2BhUKGKe7Hb0-UNih8VD5UNZy5-ojxFb3Pr3xSBBL8qj2M2%3DdQ%40mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/pgupgrade.sgml13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index 68ec68f47b6..58c6c2df8b8 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -264,6 +264,19 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--copy-file-range</option></term>
+ <listitem>
+ <para>
+ Use the <function>copy_file_range</function> system call for efficient
+ copying. On some file systems this gives results similar to
+ <option>--clone</option>, sharing physical disk blocks, while on others
+ it may still copy blocks, but do so via an optimized path. At present,
+ it is supported on Linux and FreeBSD.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-?</option></term>
<term><option>--help</option></term>
<listitem><para>show help, then exit</para></listitem>