@@ -1509,8 +1509,9 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
1509
1509
For <emphasis>major</> releases of <productname>PostgreSQL</>, the
1510
1510
internal data storage format is subject to change, thus complicating
1511
1511
upgrades. The traditional method for moving data to a new major version
1512
- is to dump and reload the database. Other methods are available,
1513
- as discussed below.
1512
+ is to dump and reload the database, though this can be slow. A
1513
+ faster method is <xref linkend="pgupgrade">. Replication methods are
1514
+ also available, as discussed below.
1514
1515
</para>
1515
1516
1516
1517
<para>
@@ -1585,12 +1586,14 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
1585
1586
1586
1587
</variablelist>
1587
1588
1588
- <sect2 id="upgrade-methods-pgdump ">
1589
- <title>Upgrading Data via <application>pg_dump </></title>
1589
+ <sect2 id="upgrading-via-pgdumpall ">
1590
+ <title>Upgrading Data via <application>pg_dumpall </></title>
1590
1591
1591
1592
<para>
1592
- To dump data from one major version of <productname>PostgreSQL</> and
1593
- reload it in another, you must use <application>pg_dump</>; file system
1593
+ One upgrade method is to dump data from one major version of
1594
+ <productname>PostgreSQL</> and reload it in another — to do
1595
+ this, you must use a <emphasis>logical</> backup tool like
1596
+ <application>pg_dumpall</>; file system
1594
1597
level backup methods will not work. (There are checks in place that prevent
1595
1598
you from using a data directory with an incompatible version of
1596
1599
<productname>PostgreSQL</productname>, so no great harm can be done by
@@ -1599,7 +1602,8 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
1599
1602
1600
1603
<para>
1601
1604
It is recommended that you use the <application>pg_dump</> and
1602
- <application>pg_dumpall</> programs from the newer version of
1605
+ <application>pg_dumpall</> programs from the <emphasis>newer</>
1606
+ version of
1603
1607
<productname>PostgreSQL</>, to take advantage of enhancements
1604
1608
that might have been made in these programs. Current releases of the
1605
1609
dump programs can read data from any server version back to 7.0.
@@ -1634,14 +1638,12 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
1634
1638
<screen>
1635
1639
<userinput>pg_dumpall > <replaceable>outputfile</></userinput>
1636
1640
</screen>
1637
- If you need to preserve OIDs (such as when using them as
1638
- foreign keys), then use the <option>-o</option> option when running
1639
- <application>pg_dumpall</>.
1640
1641
</para>
1641
1642
1642
1643
<para>
1643
1644
To make the backup, you can use the <application>pg_dumpall</application>
1644
- command from the version you are currently running. For best
1645
+ command from the version you are currently running; see <xref
1646
+ linkend="backup-dump-all"> for more details. For best
1645
1647
results, however, try to use the <application>pg_dumpall</application>
1646
1648
command from <productname>PostgreSQL</productname> &version;,
1647
1649
since this version contains bug fixes and improvements over older
@@ -1675,7 +1677,8 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
1675
1677
<step>
1676
1678
<para>
1677
1679
If restoring from backup, rename or delete the old installation
1678
- directory. It is a good idea to rename the directory, rather than
1680
+ directory if it is not version-specific. It is a good idea to
1681
+ rename the directory, rather than
1679
1682
delete it, in case you have trouble and need to revert to it. Keep
1680
1683
in mind the directory might consume significant disk space. To rename
1681
1684
the directory, use a command like this:
@@ -1747,16 +1750,24 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
1747
1750
1748
1751
</sect2>
1749
1752
1750
- <sect2 id="upgrading-methods-other ">
1751
- <title>Non-Dump Upgrade Methods </title>
1753
+ <sect2 id="upgrading-via-pg-upgrade ">
1754
+ <title>Upgrading Data via <application>pg_upgrade</> </title>
1752
1755
1753
1756
<para>
1754
- The <link linkend="pgupgrade">pg_upgrade</link> module allows an
1755
- installation to be migrated in-place from one major
1756
- <productname>PostgreSQL</> version to the next. Upgrades can be
1757
- performed in minutes.
1757
+ The <xref linkend="pgupgrade"> module allows an installation to
1758
+ be migrated in-place from one major <productname>PostgreSQL</>
1759
+ version to another. Upgrades can be performed in minutes,
1760
+ particularly with <option>--link</> mode. It requires steps similar to
1761
+ <application>pg_dumpall</> above, e.g. starting/stopping the server,
1762
+ running <application>initdb</>. The <application>pg_upgrade</> <link
1763
+ linkend="pgupgrade">documentation</> outlines the necessary steps.
1758
1764
</para>
1759
1765
1766
+ </sect2>
1767
+
1768
+ <sect2 id="upgrading-via-replication">
1769
+ <title>Upgrading Data via Replication</title>
1770
+
1760
1771
<para>
1761
1772
It is also possible to use certain replication methods, such as
1762
1773
<productname>Slony</>, to create a standby server with the updated version of
0 commit comments