summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml38
-rw-r--r--doc/src/sgml/ref/alter_database.sgml3
-rw-r--r--doc/src/sgml/ref/create_database.sgml4
3 files changed, 43 insertions, 2 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index a8542fe41ce..c1674c22cb2 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -2347,6 +2347,44 @@ include_dir 'conf.d'
</listitem>
</varlistentry>
+ <varlistentry id="guc_file_copy_method" xreflabel="file_copy_method">
+ <term><varname>file_copy_method</varname> (<type>enum</type>)
+ <indexterm>
+ <primary><varname>file_copy_method</varname> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Specifies the method used to copy files.
+ Possible values are <literal>COPY</literal> (default) and
+ <literal>CLONE</literal> (if operating support is available).
+ </para>
+
+ <para>
+ This parameter affects:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal><command>CREATE DATABASE ... STRATEGY=FILE_COPY</command></literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <command>ALTER DATABASE ... SET TABLESPACE ...</command>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ <literal>CLONE</literal> uses the <function>copy_file_range()</function>
+ (Linux, FreeBSD) or <function>copyfile</function>
+ (macOS) system calls, giving the kernel the opportunity to share disk
+ blocks or push work down to lower layers on some file systems.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="guc-max-notify-queue-pages" xreflabel="max_notify_queue_pages">
<term><varname>max_notify_queue_pages</varname> (<type>integer</type>)
<indexterm>
diff --git a/doc/src/sgml/ref/alter_database.sgml b/doc/src/sgml/ref/alter_database.sgml
index 2479c41e8d6..835c1af87eb 100644
--- a/doc/src/sgml/ref/alter_database.sgml
+++ b/doc/src/sgml/ref/alter_database.sgml
@@ -82,7 +82,8 @@ ALTER DATABASE <replaceable class="parameter">name</replaceable> RESET ALL
default tablespace to the new tablespace. The new default tablespace
must be empty for this database, and no one can be connected to
the database. Tables and indexes in non-default tablespaces are
- unaffected.
+ unaffected. The method used to copy files to the new tablespace
+ is affected by the <xref glinkend="guc_file_copy_method"/> setting.
</para>
<para>
diff --git a/doc/src/sgml/ref/create_database.sgml b/doc/src/sgml/ref/create_database.sgml
index a4b052ba08b..640c0425fae 100644
--- a/doc/src/sgml/ref/create_database.sgml
+++ b/doc/src/sgml/ref/create_database.sgml
@@ -138,7 +138,9 @@ CREATE DATABASE <replaceable class="parameter">name</replaceable>
log volume substantially, especially if the template database is large,
it also forces the system to perform a checkpoint both before and
after the creation of the new database. In some situations, this may
- have a noticeable negative impact on overall system performance.
+ have a noticeable negative impact on overall system performance. The
+ <literal>FILE_COPY</literal> strategy is affected by the <xref
+ linkend="guc_file_copy_method"/> setting.
</para>
</listitem>
</varlistentry>