mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	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
This commit is contained in:
		@@ -643,32 +643,52 @@ psql --username=postgres --file=script.sql postgres
 | 
				
			|||||||
     <itemizedlist>
 | 
					     <itemizedlist>
 | 
				
			||||||
      <listitem>
 | 
					      <listitem>
 | 
				
			||||||
       <para>
 | 
					       <para>
 | 
				
			||||||
        If you ran <command>pg_upgrade</command>
 | 
					        If the <option>--check</option> option was used, the old cluster
 | 
				
			||||||
        with <option>--check</>, no modifications were made to the old
 | 
					        was unmodified;  it can be restarted.
 | 
				
			||||||
        cluster and you can re-use it anytime.
 | 
					 | 
				
			||||||
       </para>
 | 
					       </para>
 | 
				
			||||||
      </listitem>
 | 
					      </listitem>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <listitem>
 | 
					      <listitem>
 | 
				
			||||||
       <para>
 | 
					       <para>
 | 
				
			||||||
        If you ran <command>pg_upgrade</command>
 | 
					        If the <option>--link</option> option was <emphasis>not</emphasis>
 | 
				
			||||||
        with <option>--link</>, the data files are shared between the
 | 
					        used, the old cluster was unmodified;  it can be restarted.
 | 
				
			||||||
        old and new cluster. If you started the new cluster, the new
 | 
					 | 
				
			||||||
        server has written to those shared files and it is unsafe to
 | 
					 | 
				
			||||||
        use the old cluster.
 | 
					 | 
				
			||||||
       </para>
 | 
					       </para>
 | 
				
			||||||
      </listitem>
 | 
					      </listitem>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <listitem>
 | 
					      <listitem>
 | 
				
			||||||
       <para>
 | 
					       <para>
 | 
				
			||||||
        If you ran <command>pg_upgrade</command> <emphasis>without</>
 | 
					        If the <option>--link</option> option was used, the data
 | 
				
			||||||
        <option>--link</> or did not start the new server, the
 | 
					        files might be shared between the old and new cluster:
 | 
				
			||||||
        old cluster was not modified except that, if linking
 | 
					
 | 
				
			||||||
        started, a <literal>.old</> suffix was appended to
 | 
					        <itemizedlist>
 | 
				
			||||||
        <filename>$PGDATA/global/pg_control</>.  To reuse the old
 | 
					         <listitem>
 | 
				
			||||||
        cluster, possibly remove the <filename>.old</> suffix from
 | 
					          <para>
 | 
				
			||||||
        <filename>$PGDATA/global/pg_control</>; you can then restart the
 | 
					           If <command>pg_upgrade</command> aborted before linking started,
 | 
				
			||||||
        old cluster.
 | 
					           the old cluster was unmodified;  it can be restarted.
 | 
				
			||||||
 | 
					          </para>
 | 
				
			||||||
 | 
					         </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>
 | 
					       </para>
 | 
				
			||||||
      </listitem>
 | 
					      </listitem>
 | 
				
			||||||
     </itemizedlist>
 | 
					     </itemizedlist>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user