Skip to content

Commit 39a93fd

Browse files
committed
docs: clarify pg_upgrade's recovery behavior
The previous paragraph trying to explain --check, --link, and no --link modes and the various points of failure was too complex. Instead, use bullet lists and sublists. Reported-by: Daniel Gustafsson Discussion: https://postgr.es/m/qtqiv7hI87s_Xvz5ZXHCaH-1-_AZGpIDJowzlRjF3-AbCr3RhSNydM_JCuJ8DE4WZozrtxhIWmyYTbv0syKyfGB6cYMQitp9yN-NZMm-oAo=@yesql.se Backpatch-through: 9.4
1 parent 3ef5e16 commit 39a93fd

File tree

1 file changed

+36
-16
lines changed

1 file changed

+36
-16
lines changed

doc/src/sgml/pgupgrade.sgml

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -476,32 +476,52 @@ psql --username postgres --file script.sql postgres
476476
<itemizedlist>
477477
<listitem>
478478
<para>
479-
If you ran <command>pg_upgrade</command>
480-
with <option>--check</>, no modifications were made to the old
481-
cluster and you can re-use it anytime.
479+
If the <option>--check</option> option was used, the old cluster
480+
was unmodified; it can be restarted.
482481
</para>
483482
</listitem>
484483

485484
<listitem>
486485
<para>
487-
If you ran <command>pg_upgrade</command>
488-
with <option>--link</>, the data files are shared between the
489-
old and new cluster. If you started the new cluster, the new
490-
server has written to those shared files and it is unsafe to
491-
use the old cluster.
486+
If the <option>--link</option> option was <emphasis>not</emphasis>
487+
used, the old cluster was unmodified; it can be restarted.
492488
</para>
493489
</listitem>
494490

495491
<listitem>
496492
<para>
497-
If you ran <command>pg_upgrade</command> <emphasis>without</>
498-
<option>--link</> or did not start the new server, the
499-
old cluster was not modified except that, if linking
500-
started, a <literal>.old</> suffix was appended to
501-
<filename>$PGDATA/global/pg_control</>. To reuse the old
502-
cluster, possibly remove the <filename>.old</> suffix from
503-
<filename>$PGDATA/global/pg_control</>; you can then restart the
504-
old cluster.
493+
If the <option>--link</option> option was used, the data
494+
files might be shared between the old and new cluster:
495+
496+
<itemizedlist>
497+
<listitem>
498+
<para>
499+
If <command>pg_upgrade</command> aborted before linking started,
500+
the old cluster was unmodified; it can be restarted.
501+
</para>
502+
</listitem>
503+
504+
<listitem>
505+
<para>
506+
If you did <emphasis>not</emphasis> start the new cluster, the old
507+
cluster was unmodified except that, when linking started, a
508+
<literal>.old</literal> suffix was appended to
509+
<filename>$PGDATA/global/pg_control</filename>. To reuse the old
510+
cluster, remove the <filename>.old</filename> suffix from
511+
<filename>$PGDATA/global/pg_control</filename>; you can then restart
512+
the old cluster.
513+
</para>
514+
</listitem>
515+
516+
<listitem>
517+
<para>
518+
If you did start the new cluster, it has written to shared files
519+
and it is unsafe to use the old cluster. The old cluster will
520+
need to be restored from backup in this case.
521+
</para>
522+
</listitem>
523+
524+
</itemizedlist>
505525
</para>
506526
</listitem>
507527
</itemizedlist>

0 commit comments

Comments
 (0)