class="parameter">options</replaceable></term>
<listitem><para>options to be passed directly to the
old <command>postgres</command> command; multiple
option invocations are appended</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-O</option> <replaceable class="parameter">options</replaceable></term>
<term><option>--new-options</option> <replaceable class="parameter">options</replaceable></term>
<listitem><para>options to be passed directly to the
new <command>postgres</command> command; multiple
option invocations are appended</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-p</option> <replaceable>port</replaceable></term>
<term><option>--old-port=</option><replaceable>port</replaceable></term>
<listitem><para>the old cluster port number; environment
variable <envar>PGPORTOLD</envar></para></listitem>
</varlistentry>
<varlistentry>
<term><option>-P</option> <replaceable>port</replaceable></term>
<term><option>--new-port=</option><replaceable>port</replaceable></term>
<listitem><para>the new cluster port number; environment
variable <envar>PGPORTNEW</envar></para></listitem>
</varlistentry>
<varlistentry>
<term><option>-r</option></term>
<term><option>--retain</option></term>
<listitem><para>retain SQL and log files even after successful completion
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-s</option> <replaceable>dir</replaceable></term>
<term><option>--socketdir=</option><replaceable>dir</replaceable></term>
<listitem><para>directory to use for postmaster sockets during upgrade;
default is current working directory; environment
variable <envar>PGSOCKETDIR</envar></para></listitem>
</varlistentry>
<varlistentry>
<term><option>-U</option> <replaceable>username</replaceable></term>
<term><option>--username=</option><replaceable>username</replaceable></term>
<listitem><para>cluster's install user name; environment
variable <envar>PGUSER</envar></para></listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option></term>
<term><option>--verbose</option></term>
<listitem><para>enable verbose internal logging</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-V</option></term>
<term><option>--version</option></term>
<listitem><para>display version information, then exit</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--clone</option></term>
<listitem>
<para>
Use efficient file cloning (also known as <quote>reflinks</quote> on
some systems) instead of copying files to the new cluster. This can
result in near-instantaneous copying of the data files, giving the
speed advantages of <option>-k</option>/<option>--link</option> while
leaving the old cluster untouched.
</para>
<para>
File cloning is only supported on some operating systems and file
systems. If it is selected but not supported, the
<application>pg_upgrade</application> run will error. At present, it
is supported on Linux (kernel 4.5 or later) with Btrfs and XFS (on
file systems created with reflink support), and on macOS with APFS.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--copy</option></term>
<listitem>
<para>
Copy files to the new cluster. This is the default. (See also
<option>--link</option>, <option>--clone</option>,
<option>--copy-file-range</option>, and <option>--swap</option>.)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--copy-file-range</option></term>
<listitem>
<para>
Use the <function>copy_file_range</function>