</listitem>
<listitem>
<para>
If you did <emphasis>not</emphasis> start the new cluster, the old
cluster was unmodified except that, when linking started, a
<literal>.old</literal> suffix was appended to
<filename>$PGDATA/global/pg_control</filename>. To reuse the old
cluster, remove the <filename>.old</filename> suffix from
<filename>$PGDATA/global/pg_control</filename>; you can then restart
the old cluster.
</para>
</listitem>
<listitem>
<para>
If you did start the new cluster, it has written to shared files
and it is unsafe to use the old cluster. The old cluster will
need to be restored from backup in this case.
</para>
</listitem>
</itemizedlist></para>
</listitem>
<listitem>
<para>
If the <option>--swap</option> option was used, the old cluster might
be destructively modified:
<itemizedlist>
<listitem>
<para>
If <command>pg_upgrade</command> aborts before reporting that the
old cluster is no longer safe to start, the old cluster was
unmodified; it can be restarted.
</para>
</listitem>
<listitem>
<para>
If <command>pg_upgrade</command> has reported that the old cluster
is no longer safe to start, the old cluster was destructively
modified. The old cluster will need to be restored from backup in
this case.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist></para>
</step>
</procedure>
</refsect1>
<refsect1>
<title>Environment</title>
<para>
Some environment variables can be used to provide defaults for command-line options:
<variablelist>
<varlistentry>
<term><envar>PGBINOLD</envar></term>
<listitem>
<para>
The old PostgreSQL executable directory; option
<option>-b</option>/<option>--old-bindir</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><envar>PGBINNEW</envar></term>
<listitem>
<para>
The new PostgreSQL executable directory; option
<option>-B</option>/<option>--new-bindir</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><envar>PGDATAOLD</envar></term>
<listitem>
<para>
The old database cluster configuration directory; option
<option>-d</option>/<option>--old-datadir</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><envar>PGDATANEW</envar></term>
<listitem>
<para>
The new database cluster configuration directory; option
<option>-D</option>/<option>--new-datadir</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><envar>PGPORTOLD</envar></term>
<listitem>
<para>
The old cluster port number; option
<option>-p</option>/<option>--old-port</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><envar>PGPORTNEW</envar></term>
<listitem>
<para>
The new cluster port number; option
<option>-P</option>/<option>--new-port</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><envar>PGSOCKETDIR</envar></term>
<listitem>
<para>
Directory to use for postmaster sockets during upgrade; option
<option>-s</option>/<option>--socketdir</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><envar>PGUSER</envar></term>
<listitem>
<para>
Cluster's install user name; option
<option>-U</option>/<option>--username</option>.
</para>
</listitem>
</varlistentry>
</variablelist>