which may be slower due
to memory management overheads. Memory that is allocated at startup
with <varname>min_dynamic_shared_memory</varname> is affected by
the <varname>huge_pages</varname> setting on operating systems where
that is supported, and may be more likely to benefit from larger pages
on operating systems where that is managed automatically.
The default value is <literal>0</literal> (none). This parameter can
only be set at server start.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="runtime-config-resource-disk">
<title>Disk</title>
<variablelist>
<varlistentry id="guc-temp-file-limit" xreflabel="temp_file_limit">
<term><varname>temp_file_limit</varname> (<type>integer</type>)
<indexterm>
<primary><varname>temp_file_limit</varname> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
Specifies the maximum amount of disk space that a process can use
for temporary files, such as sort and hash temporary files, or the
storage file for a held cursor. A transaction attempting to exceed
this limit will be canceled.
If this value is specified without units, it is taken as kilobytes.
<literal>-1</literal> (the default) means no limit.
Only superusers and users with the appropriate <literal>SET</literal>
privilege can change this setting.
</para>
<para>
This setting constrains the total space used at any instant by all
temporary files used by a given <productname>PostgreSQL</productname> process.
It should be noted that disk space used for explicit temporary
tables, as opposed to temporary files used behind-the-scenes in query
execution, does <emphasis>not</emphasis> count against this limit.
</para>
</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>
<primary><varname>max_notify_queue_pages</varname> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
Specifies the maximum amount of allocated pages for
<xref linkend="sql-notify"/> / <xref linkend="sql-listen"/> queue.
The default value is 1048576. For 8 KB pages it allows to consume
up to 8 GB of disk space.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="runtime-config-resource-kernel">
<title>Kernel