Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f0fc956

Browse files
committed
Update wording of installation when upgrading, to more clearly
distinguish major vs minor release upgrades.
1 parent 320abc3 commit f0fc956

File tree

1 file changed

+61
-35
lines changed

1 file changed

+61
-35
lines changed

doc/src/sgml/installation.sgml

Lines changed: 61 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.275 2007/01/25 23:34:28 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.276 2007/01/26 22:52:50 momjian Exp $ -->
22

33
<chapter id="installation">
44
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -367,36 +367,39 @@ su - postgres
367367
]]>
368368

369369
<sect1 id="install-upgrading">
370-
<title>If You Are Upgrading</title>
370+
<title>Upgrading</title>
371371

372372
<indexterm zone="install-upgrading">
373373
<primary>upgrading</primary>
374374
</indexterm>
375375

376376
<para>
377-
The internal data storage format changes with new releases of
378-
<productname>PostgreSQL</>. Therefore, if you are upgrading an
379-
existing installation that does not have a version number
377+
These instructions assume that your existing installation is under the
378+
<filename>/usr/local/pgsql</> directory, and that the data area is in
379+
<filename>/usr/local/pgsql/data</>. Substitute your paths
380+
appropriately.
381+
</para>
382+
383+
<para>
384+
The internal data storage format typically changes in every major
385+
release of <productname>PostgreSQL</>. Therefore, if you are upgrading
386+
an existing installation that does not have a version number of
380387
<quote>&majorversion;.x</quote>, you must back up and restore your
381-
data as shown here. These instructions assume that your existing
382-
installation is under the <filename>/usr/local/pgsql</> directory,
383-
and that the data area is in <filename>/usr/local/pgsql/data</>.
384-
Substitute your paths appropriately.
388+
data. If you are upgrading from the same major version, the new version
389+
can use your current data files, so a backup and restore is optional.
390+
If you wish to avoid the backup/restore, merely skip those steps below.
385391
</para>
386392

387393
<procedure>
388394
<step>
389395
<para>
390-
Make sure that your database is not updated during or after the
391-
backup. This does not affect the integrity of the backup, but the
392-
changed data would of course not be included. If necessary, edit
393-
the permissions in the file
394-
<filename>/usr/local/pgsql/data/pg_hba.conf</> (or equivalent) to
395-
disallow access from everyone except you.
396+
If making a backup, make sure that your database is being updated.
397+
This does not affect the integrity of the backup, but the changed
398+
data would of course not be included. If necessary, edit the
399+
permissions in the file <filename>/usr/local/pgsql/data/pg_hba.conf</>
400+
(or equivalent) to disallow access from everyone except you.
396401
</para>
397-
</step>
398402

399-
<step>
400403
<para>
401404
<indexterm>
402405
<primary>pg_dumpall</primary>
@@ -429,9 +432,7 @@ su - postgres
429432

430433
<step>
431434
<para>
432-
If you are installing the new version at the same location as the
433-
old one then shut down the old server, at the latest before you
434-
install the new files:
435+
Shut down the old server:
435436
<screen>
436437
<userinput>pg_ctl stop</>
437438
</screen>
@@ -448,38 +449,63 @@ su - postgres
448449

449450
<step>
450451
<para>
451-
If you are installing in the same place as the old version then
452-
it is also a good idea to move the old installation out of the
453-
way, in case you have trouble and need to revert to it.
454-
Use a command like this:
455-
<screen>
452+
If restoring from backup, rename or delete the old installation
453+
directory. It is a good idea to rename the directory, rather than
454+
delete it, in case you have trouble and need to revert to it. Keep
455+
in mind the directory might consume significant disk space. To rename
456+
the directory, use a command like this:
457+
<screen>
456458
<userinput>mv /usr/local/pgsql /usr/local/pgsql.old</>
457459
</screen>
458460
</para>
459461
</step>
460-
</procedure>
461462

462-
<para>
463-
After you have installed <productname>PostgreSQL</> &version;, create a new database
464-
directory and start the new server. Remember that you must execute
465-
these commands while logged in to the special database user account
466-
(which you already have if you are upgrading).
463+
<step>
464+
<para>
465+
Install the new version of <productname>PostgreSQL</productname> as
466+
outlined in <![%standalone-include[the next section.]]>
467+
<![%standalone-ignore[<xref linkend="install-procedure">.]]>
468+
</para>
469+
</step>
470+
471+
<step>
472+
<para>
473+
Create a new database cluster if needed. Remember that you must
474+
execute these commands while logged in to the special database user
475+
account (which you already have if you are upgrading).
467476
<programlisting>
468477
<userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</>
478+
</programlisting>
479+
</para>
480+
</step>
481+
482+
<step>
483+
<para>
484+
Start the database server, again from the special database user
485+
account:
486+
<programlisting>
469487
<userinput>/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data</>
470488
</programlisting>
471-
Finally, restore your data with
489+
</para>
490+
</step>
491+
492+
<step>
493+
<para>
494+
Finally, restore your data from backup with
472495
<screen>
473496
<userinput>/usr/local/pgsql/bin/psql -d postgres -f <replaceable>outputfile</></userinput>
474497
</screen>
475-
using the <emphasis>new</> <application>psql</>.
476-
</para>
498+
using the <emphasis>new</> <application>psql</>.
499+
</para>
500+
</step>
501+
</procedure>
477502

478503
<para>
479504
Further discussion appears in
480505
<![%standalone-include[the documentation,]]>
481506
<![%standalone-ignore[<xref linkend="migration">,]]>
482-
which you are encouraged to read in any case.
507+
including instructions on how the previous installation can continue
508+
running while the new installation is installed.
483509
</para>
484510
</sect1>
485511

0 commit comments

Comments
 (0)