@@ -1517,8 +1517,9 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
1517
1517
For <emphasis>major</> releases of <productname>PostgreSQL</>, the
1518
1518
internal data storage format is subject to change, thus complicating
1519
1519
upgrades. The traditional method for moving data to a new major version
1520
- is to dump and reload the database. Other methods are available,
1521
- as discussed below.
1520
+ is to dump and reload the database, though this can be slow. A
1521
+ faster method is <xref linkend="pgupgrade">. Replication methods are
1522
+ also available, as discussed below.
1522
1523
</para>
1523
1524
1524
1525
<para>
@@ -1593,12 +1594,14 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
1593
1594
1594
1595
</variablelist>
1595
1596
1596
- <sect2 id="upgrade-methods-pgdump ">
1597
- <title>Upgrading Data via <application>pg_dump </></title>
1597
+ <sect2 id="upgrading-via-pgdumpall ">
1598
+ <title>Upgrading Data via <application>pg_dumpall </></title>
1598
1599
1599
1600
<para>
1600
- To dump data from one major version of <productname>PostgreSQL</> and
1601
- reload it in another, you must use <application>pg_dump</>; file system
1601
+ One upgrade method is to dump data from one major version of
1602
+ <productname>PostgreSQL</> and reload it in another — to do
1603
+ this, you must use a <emphasis>logical</> backup tool like
1604
+ <application>pg_dumpall</>; file system
1602
1605
level backup methods will not work. (There are checks in place that prevent
1603
1606
you from using a data directory with an incompatible version of
1604
1607
<productname>PostgreSQL</productname>, so no great harm can be done by
@@ -1607,7 +1610,8 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
1607
1610
1608
1611
<para>
1609
1612
It is recommended that you use the <application>pg_dump</> and
1610
- <application>pg_dumpall</> programs from the newer version of
1613
+ <application>pg_dumpall</> programs from the <emphasis>newer</>
1614
+ version of
1611
1615
<productname>PostgreSQL</>, to take advantage of enhancements
1612
1616
that might have been made in these programs. Current releases of the
1613
1617
dump programs can read data from any server version back to 7.0.
@@ -1642,14 +1646,12 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
1642
1646
<screen>
1643
1647
<userinput>pg_dumpall > <replaceable>outputfile</></userinput>
1644
1648
</screen>
1645
- If you need to preserve OIDs (such as when using them as
1646
- foreign keys), then use the <option>-o</option> option when running
1647
- <application>pg_dumpall</>.
1648
1649
</para>
1649
1650
1650
1651
<para>
1651
1652
To make the backup, you can use the <application>pg_dumpall</application>
1652
- command from the version you are currently running. For best
1653
+ command from the version you are currently running; see <xref
1654
+ linkend="backup-dump-all"> for more details. For best
1653
1655
results, however, try to use the <application>pg_dumpall</application>
1654
1656
command from <productname>PostgreSQL</productname> &version;,
1655
1657
since this version contains bug fixes and improvements over older
@@ -1683,7 +1685,8 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
1683
1685
<step>
1684
1686
<para>
1685
1687
If restoring from backup, rename or delete the old installation
1686
- directory. It is a good idea to rename the directory, rather than
1688
+ directory if it is not version-specific. It is a good idea to
1689
+ rename the directory, rather than
1687
1690
delete it, in case you have trouble and need to revert to it. Keep
1688
1691
in mind the directory might consume significant disk space. To rename
1689
1692
the directory, use a command like this:
@@ -1755,16 +1758,24 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
1755
1758
1756
1759
</sect2>
1757
1760
1758
- <sect2 id="upgrading-methods-other ">
1759
- <title>Non-Dump Upgrade Methods </title>
1761
+ <sect2 id="upgrading-via-pg-upgrade ">
1762
+ <title>Upgrading Data via <application>pg_upgrade</> </title>
1760
1763
1761
1764
<para>
1762
- The <link linkend="pgupgrade">pg_upgrade</link> module allows an
1763
- installation to be migrated in-place from one major
1764
- <productname>PostgreSQL</> version to the next. Upgrades can be
1765
- performed in minutes.
1765
+ The <xref linkend="pgupgrade"> module allows an installation to
1766
+ be migrated in-place from one major <productname>PostgreSQL</>
1767
+ version to another. Upgrades can be performed in minutes,
1768
+ particularly with <option>--link</> mode. It requires steps similar to
1769
+ <application>pg_dumpall</> above, e.g. starting/stopping the server,
1770
+ running <application>initdb</>. The <application>pg_upgrade</> <link
1771
+ linkend="pgupgrade">documentation</> outlines the necessary steps.
1766
1772
</para>
1767
1773
1774
+ </sect2>
1775
+
1776
+ <sect2 id="upgrading-via-replication">
1777
+ <title>Upgrading Data via Replication</title>
1778
+
1768
1779
<para>
1769
1780
It is also possible to use certain replication methods, such as
1770
1781
<productname>Slony</>, to create a standby server with the updated version of
0 commit comments