pg_dumpall reccomendation in release notes
Bruce, Tom:
Can we change this text in the template release notes?
A dump/restore using
pg_dumpall<http://www.postgresql.org/docs/9.3/static/app-pg-dumpall.html>,
or use of
pg_upgrade<http://www.postgresql.org/docs/9.3/static/pgupgrade.html>, is
required for those wishing to migrate data from any previous release.
Again, here we're recommending pg_dumpall with its many limitations, and
not mentioning pg_dump/pg_restore at all. This has caused several
people to ask me if pg_dump is not supported for upgrading anymore. Fix?
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
Can we change this text in the template release notes?
A dump/restore using
pg_dumpall<http://www.postgresql.org/docs/9.3/static/app-pg-dumpall.html>,
or use of
pg_upgrade<http://www.postgresql.org/docs/9.3/static/pgupgrade.html>, is
required for those wishing to migrate data from any previous release.
Again, here we're recommending pg_dumpall with its many limitations, and
not mentioning pg_dump/pg_restore at all. This has caused several
people to ask me if pg_dump is not supported for upgrading anymore. Fix?
There's a very good reason for not recommending pg_dump in this context:
it won't dump everything. Yeah, if you know what you're doing, you might
use per-database pg_dump runs plus pg_dumpall -g to catch the roles etc,
but we're not going to try to wedge all that info into one or two
sentences of release-note boilerplate. If you can get that right then
you don't need the release notes to remind you anyway. If you aren't
likely to get it right then the release notes would do you no service
by suggesting it.
I'm not sure what "many limitations" you think pg_dumpall has that pg_dump
doesn't.
I do think that it might be time to reword this to recommend pg_upgrade
first, though. ISTM that the current wording dates from when pg_upgrade
could charitably be described as experimental.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 02/25/2014 03:41 PM, Tom Lane wrote:
Josh Berkus <josh@agliodbs.com> writes:
Can we change this text in the template release notes?
A dump/restore using
pg_dumpall<http://www.postgresql.org/docs/9.3/static/app-pg-dumpall.html>,
or use of
pg_upgrade<http://www.postgresql.org/docs/9.3/static/pgupgrade.html>, is
required for those wishing to migrate data from any previous release.Again, here we're recommending pg_dumpall with its many limitations, and
not mentioning pg_dump/pg_restore at all. This has caused several
people to ask me if pg_dump is not supported for upgrading anymore. Fix?There's a very good reason for not recommending pg_dump in this context:
it won't dump everything. Yeah, if you know what you're doing, you might
use per-database pg_dump runs plus pg_dumpall -g to catch the roles etc,
but we're not going to try to wedge all that info into one or two
sentences of release-note boilerplate. If you can get that right then
you don't need the release notes to remind you anyway. If you aren't
likely to get it right then the release notes would do you no service
by suggesting it.
Right. But the fact that we don't mention it *at all* has caused some
users to ask me if regular pg_dump doesn't work for upgrades anymore.
Which reminds me, I need to get the doc patch for the upgrade page in
this week.
It does make me wonder if we should direct users to the upgrade page
though, instead of the individual command pages.
I'm not sure what "many limitations" you think pg_dumpall has that pg_dump
doesn't.
Lack of parallel dump and restore is the biggest one.
I do think that it might be time to reword this to recommend pg_upgrade
first, though. ISTM that the current wording dates from when pg_upgrade
could charitably be described as experimental.
Yah.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Import Notes
Reply to msg id not found: WM0283b87d34b95c3aaa78eb010f02ffda550e8651af8b1866eb8a944aad2d2be3edeb444a5781f818f5ecb8118808d526@asav-3.01.com
Josh Berkus <josh@agliodbs.com> writes:
On 02/25/2014 03:41 PM, Tom Lane wrote:
There's a very good reason for not recommending pg_dump in this context:
it won't dump everything. Yeah, if you know what you're doing, you might
use per-database pg_dump runs plus pg_dumpall -g to catch the roles etc,
but we're not going to try to wedge all that info into one or two
sentences of release-note boilerplate. If you can get that right then
you don't need the release notes to remind you anyway. If you aren't
likely to get it right then the release notes would do you no service
by suggesting it.
Right. But the fact that we don't mention it *at all* has caused some
users to ask me if regular pg_dump doesn't work for upgrades anymore.
TBH, anybody who's asking that kind of question probably falls in the
category of "wouldn't get it right". I've heard enough bitching from
novices who thought that pg_dump would be enough to get everything out
of their now-gone database that I have no desire to encourage use of
bare pg_dump here.
(Whether we shouldn't redesign the functionality of these programs
is a different discussion. The release notes have to reflect what is,
though, not what might ideally be.)
It does make me wonder if we should direct users to the upgrade page
though, instead of the individual command pages.
If we had a page discussing the pros and cons of different upgrade
methods, yeah, I'd be in favor of reducing the release-note text to a
pointer to that page. I don't see such a page in a quick skim of the
fine manual's table of contents though?
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 02/25/2014 03:59 PM, Tom Lane wrote:
If we had a page discussing the pros and cons of different upgrade
methods, yeah, I'd be in favor of reducing the release-note text to a
pointer to that page. I don't see such a page in a quick skim of the
fine manual's table of contents though?
I owe an update of
http://www.postgresql.org/docs/9.3/static/upgrading.html; I think I can
easily include a discussion of the various options there.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Import Notes
Reply to msg id not found: WM913621ff32565bfa592d6bad597c87238a8d5628953280e67263bb1b740652b4cc5f94c0a0823cc3fca6de74262b2f09@asav-3.01.com
On Tue, Feb 25, 2014 at 06:41:26PM -0500, Tom Lane wrote:
I'm not sure what "many limitations" you think pg_dumpall has that pg_dump
doesn't.I do think that it might be time to reword this to recommend pg_upgrade
first, though. ISTM that the current wording dates from when pg_upgrade
could charitably be described as experimental.
Wow, so pg_upgrade takes the lead! And from Tom too! :-)
I agree with Tom that mentioning pg_dump/restore is going to lead to
global object data loss, and throwing the users to a URL with no
explaination isn't going to help either. What we could do is to
restructure the existing text and add a link to the upgrade URL for more
details.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 02/25/2014 04:42 PM, Bruce Momjian wrote:
On Tue, Feb 25, 2014 at 06:41:26PM -0500, Tom Lane wrote:
I'm not sure what "many limitations" you think pg_dumpall has that pg_dump
doesn't.I do think that it might be time to reword this to recommend pg_upgrade
first, though. ISTM that the current wording dates from when pg_upgrade
could charitably be described as experimental.Wow, so pg_upgrade takes the lead! And from Tom too! :-)
I agree with Tom that mentioning pg_dump/restore is going to lead to
global object data loss, and throwing the users to a URL with no
explaination isn't going to help either. What we could do is to
restructure the existing text and add a link to the upgrade URL for more
details.
What I was suggesting was something like:
"Users upgrading from earlier versions will need to go through the
entire upgrade procedure, as described on our upgrade page: <link>"
The problem is that anything we say about "how to upgrade" in one short
sentence is going to confuse some people. BTW, the reason I got that
question about pg_dump was that 9.2's release notes say "pg_dump" and
9.3's say "pg_dumpall", causing users to think there's been some kind of
change.
Of course, this means I need to fix the upgrade page, and I need to
write backported versions of that fix for at least 9.1 and 9.2.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Import Notes
Reply to msg id not found: WM40d66dbaebfc068fb041cb6c01f432514a0bf30be7d6c162f9781305af4c0b3793addb70ca74a1b928f48eeaa964e763@asav-1.01.com
On Tue, Feb 25, 2014 at 05:05:09PM -0800, Josh Berkus wrote:
On 02/25/2014 04:42 PM, Bruce Momjian wrote:
On Tue, Feb 25, 2014 at 06:41:26PM -0500, Tom Lane wrote:
I'm not sure what "many limitations" you think pg_dumpall has that pg_dump
doesn't.I do think that it might be time to reword this to recommend pg_upgrade
first, though. ISTM that the current wording dates from when pg_upgrade
could charitably be described as experimental.Wow, so pg_upgrade takes the lead! And from Tom too! :-)
I agree with Tom that mentioning pg_dump/restore is going to lead to
global object data loss, and throwing the users to a URL with no
explanation isn't going to help either. What we could do is to
restructure the existing text and add a link to the upgrade URL for more
details.What I was suggesting was something like:
"Users upgrading from earlier versions will need to go through the
entire upgrade procedure, as described on our upgrade page: <link>"The problem is that anything we say about "how to upgrade" in one short
sentence is going to confuse some people. BTW, the reason I got that
question about pg_dump was that 9.2's release notes say "pg_dump" and
9.3's say "pg_dumpall", causing users to think there's been some kind of
change.Of course, this means I need to fix the upgrade page, and I need to
write backported versions of that fix for at least 9.1 and 9.2.
I have developed the attached patch to address the issues raised above:
o non-text output of pg_dump is mentioned
o mentions of using OID for keys is removed
o the necessity of pg_dumpall --globals-only is mentioned
o using pg_dump parallel mode rather than pg_dumpall for upgrades is mentioned
o pg_upgrade is mentioned more prominently for upgrades
o replication upgrades are in their own section
I don't think we want to mention pg_upgrade as the _primary_
major-version upgrade method. While the pg_dump upgrade section is
long, it is mostly about starting/stoping the server, moving
directories, etc, the same things you have to do for pg_upgrade, so I
just mentioned that int the pg_upgrade section. Other ideas?
I plan to apply this to head and 9.4.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
Attachments:
upgrade.difftext/x-diff; charset=us-asciiDownload
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
new file mode 100644
index 06f064e..07ca0dc
*** a/doc/src/sgml/backup.sgml
--- b/doc/src/sgml/backup.sgml
***************
*** 28,34 ****
<title><acronym>SQL</> Dump</title>
<para>
! The idea behind this dump method is to generate a text file with SQL
commands that, when fed back to the server, will recreate the
database in the same state as it was at the time of the dump.
<productname>PostgreSQL</> provides the utility program
--- 28,34 ----
<title><acronym>SQL</> Dump</title>
<para>
! The idea behind this dump method is to generate a file with SQL
commands that, when fed back to the server, will recreate the
database in the same state as it was at the time of the dump.
<productname>PostgreSQL</> provides the utility program
*************** pg_dump <replaceable class="parameter">d
*** 39,44 ****
--- 39,47 ----
</synopsis>
As you see, <application>pg_dump</> writes its result to the
standard output. We will see below how this can be useful.
+ While the above command creates a text file, <application>pg_dump</>
+ can create files in other formats that allow for parallism and more
+ fine-grained control of object restoration.
</para>
<para>
*************** pg_dump <replaceable class="parameter">d
*** 98,117 ****
exclusive lock, such as most forms of <command>ALTER TABLE</command>.)
</para>
- <important>
- <para>
- If your database schema relies on OIDs (for instance, as foreign
- keys) you must instruct <application>pg_dump</> to dump the OIDs
- as well. To do this, use the <option>-o</option> command-line
- option.
- </para>
- </important>
-
<sect2 id="backup-dump-restore">
<title>Restoring the Dump</title>
<para>
! The text files created by <application>pg_dump</> are intended to
be read in by the <application>psql</application> program. The
general command form to restore a dump is
<synopsis>
--- 101,111 ----
exclusive lock, such as most forms of <command>ALTER TABLE</command>.)
</para>
<sect2 id="backup-dump-restore">
<title>Restoring the Dump</title>
<para>
! Text files created by <application>pg_dump</> are intended to
be read in by the <application>psql</application> program. The
general command form to restore a dump is
<synopsis>
*************** psql <replaceable class="parameter">dbna
*** 127,132 ****
--- 121,128 ----
supports options similar to <application>pg_dump</> for specifying
the database server to connect to and the user name to use. See
the <xref linkend="app-psql"> reference page for more information.
+ Non-text file dumps are restored using the <xref
+ linkend="app-pgrestore"> utility.
</para>
<para>
*************** psql -f <replaceable class="parameter">i
*** 225,231 ****
roles, tablespaces, and empty databases, then invoking
<application>pg_dump</> for each database. This means that while
each database will be internally consistent, the snapshots of
! different databases might not be exactly in-sync.
</para>
</sect2>
--- 221,234 ----
roles, tablespaces, and empty databases, then invoking
<application>pg_dump</> for each database. This means that while
each database will be internally consistent, the snapshots of
! different databases are not sychronized.
! </para>
!
! <para>
! Cluster-wide data can be dumped alone using the
! <application>pg_dumpall</> <option>--globals-only</> option.
! This is necessary to fully backup the cluster if running the
! <application>pg_dump</> command on individual databases.
</para>
</sect2>
diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
new file mode 100644
index 1d91d92..00cb7cb
*** a/doc/src/sgml/runtime.sgml
--- b/doc/src/sgml/runtime.sgml
*************** $ <userinput>kill -INT `head -1 /usr/loc
*** 1517,1524 ****
For <emphasis>major</> releases of <productname>PostgreSQL</>, the
internal data storage format is subject to change, thus complicating
upgrades. The traditional method for moving data to a new major version
! is to dump and reload the database. Other methods are available,
! as discussed below.
</para>
<para>
--- 1517,1525 ----
For <emphasis>major</> releases of <productname>PostgreSQL</>, the
internal data storage format is subject to change, thus complicating
upgrades. The traditional method for moving data to a new major version
! is to dump and reload the database, though this can be slow. A
! faster method is <xref linkend="pgupgrade">. Replication methods are
! also available, as discussed below.
</para>
<para>
*************** $ <userinput>kill -INT `head -1 /usr/loc
*** 1593,1600 ****
</variablelist>
! <sect2 id="upgrade-methods-pgdump">
! <title>Upgrading Data via <application>pg_dump</></title>
<para>
To dump data from one major version of <productname>PostgreSQL</> and
--- 1594,1601 ----
</variablelist>
! <sect2 id="upgrading-via-pgdumpall">
! <title>Upgrading Data via <application>pg_dumpall</></title>
<para>
To dump data from one major version of <productname>PostgreSQL</> and
*************** $ <userinput>kill -INT `head -1 /usr/loc
*** 1642,1655 ****
<screen>
<userinput>pg_dumpall > <replaceable>outputfile</></userinput>
</screen>
- If you need to preserve OIDs (such as when using them as
- foreign keys), then use the <option>-o</option> option when running
- <application>pg_dumpall</>.
</para>
<para>
To make the backup, you can use the <application>pg_dumpall</application>
! command from the version you are currently running. For best
results, however, try to use the <application>pg_dumpall</application>
command from <productname>PostgreSQL</productname> &version;,
since this version contains bug fixes and improvements over older
--- 1643,1654 ----
<screen>
<userinput>pg_dumpall > <replaceable>outputfile</></userinput>
</screen>
</para>
<para>
To make the backup, you can use the <application>pg_dumpall</application>
! command from the version you are currently running; see <xref
! linkend="backup-dump-all"> for more details. For best
results, however, try to use the <application>pg_dumpall</application>
command from <productname>PostgreSQL</productname> &version;,
since this version contains bug fixes and improvements over older
*************** $ <userinput>kill -INT `head -1 /usr/loc
*** 1683,1689 ****
<step>
<para>
If restoring from backup, rename or delete the old installation
! directory. It is a good idea to rename the directory, rather than
delete it, in case you have trouble and need to revert to it. Keep
in mind the directory might consume significant disk space. To rename
the directory, use a command like this:
--- 1682,1689 ----
<step>
<para>
If restoring from backup, rename or delete the old installation
! directory if it is not version-specific. It is a good idea to
! rename the directory, rather than
delete it, in case you have trouble and need to revert to it. Keep
in mind the directory might consume significant disk space. To rename
the directory, use a command like this:
*************** pg_dumpall -p 5432 | psql -d postgres -p
*** 1755,1770 ****
</sect2>
! <sect2 id="upgrading-methods-other">
! <title>Non-Dump Upgrade Methods</title>
<para>
! The <link linkend="pgupgrade">pg_upgrade</link> module allows an
! installation to be migrated in-place from one major
! <productname>PostgreSQL</> version to the next. Upgrades can be
! performed in minutes.
</para>
<para>
It is also possible to use certain replication methods, such as
<productname>Slony</>, to create a standby server with the updated version of
--- 1755,1778 ----
</sect2>
! <sect2 id="upgrading-via-pg-upgrade">
! <title>Upgrading Data via <application>pg_upgrade</></title>
<para>
! The <xref linkend="pgupgrade"> module allows an installation to
! be migrated in-place from one major <productname>PostgreSQL</>
! version to another. Upgrades can be performed in minutes.
! It requires steps similar to <application>pg_dumpall</> above, e.g.
! starting/stopping the server, running <application>initdb</>. The
! <application>pg_upgrade</> <link linkend="pgupgrade">documentation</>
! outlines the necessary steps.
</para>
+ </sect2>
+
+ <sect2 id="upgrading-via-replication">
+ <title>Upgrading Data via Replication</title>
+
<para>
It is also possible to use certain replication methods, such as
<productname>Slony</>, to create a standby server with the updated version of
On Thu, Aug 21, 2014 at 12:18:46PM -0400, Bruce Momjian wrote:
I have developed the attached patch to address the issues raised above:
o non-text output of pg_dump is mentioned
o mentions of using OID for keys is removed
o the necessity of pg_dumpall --globals-only is mentioned
o using pg_dump parallel mode rather than pg_dumpall for upgrades is mentioned
o pg_upgrade is mentioned more prominently for upgrades
o replication upgrades are in their own sectionI don't think we want to mention pg_upgrade as the _primary_
major-version upgrade method. While the pg_dump upgrade section is
long, it is mostly about starting/stoping the server, moving
directories, etc, the same things you have to do for pg_upgrade, so I
just mentioned that int the pg_upgrade section. Other ideas?I plan to apply this to head and 9.4.
Updated patch attached and applied.
Any other suggestions? Please let me know.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
Attachments:
upgrade.difftext/x-diff; charset=us-asciiDownload
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
new file mode 100644
index 06f064e..07ca0dc
*** a/doc/src/sgml/backup.sgml
--- b/doc/src/sgml/backup.sgml
***************
*** 28,34 ****
<title><acronym>SQL</> Dump</title>
<para>
! The idea behind this dump method is to generate a text file with SQL
commands that, when fed back to the server, will recreate the
database in the same state as it was at the time of the dump.
<productname>PostgreSQL</> provides the utility program
--- 28,34 ----
<title><acronym>SQL</> Dump</title>
<para>
! The idea behind this dump method is to generate a file with SQL
commands that, when fed back to the server, will recreate the
database in the same state as it was at the time of the dump.
<productname>PostgreSQL</> provides the utility program
*************** pg_dump <replaceable class="parameter">d
*** 39,44 ****
--- 39,47 ----
</synopsis>
As you see, <application>pg_dump</> writes its result to the
standard output. We will see below how this can be useful.
+ While the above command creates a text file, <application>pg_dump</>
+ can create files in other formats that allow for parallism and more
+ fine-grained control of object restoration.
</para>
<para>
*************** pg_dump <replaceable class="parameter">d
*** 98,117 ****
exclusive lock, such as most forms of <command>ALTER TABLE</command>.)
</para>
- <important>
- <para>
- If your database schema relies on OIDs (for instance, as foreign
- keys) you must instruct <application>pg_dump</> to dump the OIDs
- as well. To do this, use the <option>-o</option> command-line
- option.
- </para>
- </important>
-
<sect2 id="backup-dump-restore">
<title>Restoring the Dump</title>
<para>
! The text files created by <application>pg_dump</> are intended to
be read in by the <application>psql</application> program. The
general command form to restore a dump is
<synopsis>
--- 101,111 ----
exclusive lock, such as most forms of <command>ALTER TABLE</command>.)
</para>
<sect2 id="backup-dump-restore">
<title>Restoring the Dump</title>
<para>
! Text files created by <application>pg_dump</> are intended to
be read in by the <application>psql</application> program. The
general command form to restore a dump is
<synopsis>
*************** psql <replaceable class="parameter">dbna
*** 127,132 ****
--- 121,128 ----
supports options similar to <application>pg_dump</> for specifying
the database server to connect to and the user name to use. See
the <xref linkend="app-psql"> reference page for more information.
+ Non-text file dumps are restored using the <xref
+ linkend="app-pgrestore"> utility.
</para>
<para>
*************** psql -f <replaceable class="parameter">i
*** 225,231 ****
roles, tablespaces, and empty databases, then invoking
<application>pg_dump</> for each database. This means that while
each database will be internally consistent, the snapshots of
! different databases might not be exactly in-sync.
</para>
</sect2>
--- 221,234 ----
roles, tablespaces, and empty databases, then invoking
<application>pg_dump</> for each database. This means that while
each database will be internally consistent, the snapshots of
! different databases are not sychronized.
! </para>
!
! <para>
! Cluster-wide data can be dumped alone using the
! <application>pg_dumpall</> <option>--globals-only</> option.
! This is necessary to fully backup the cluster if running the
! <application>pg_dump</> command on individual databases.
</para>
</sect2>
diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
new file mode 100644
index 1d91d92..f337485
*** a/doc/src/sgml/runtime.sgml
--- b/doc/src/sgml/runtime.sgml
*************** $ <userinput>kill -INT `head -1 /usr/loc
*** 1517,1524 ****
For <emphasis>major</> releases of <productname>PostgreSQL</>, the
internal data storage format is subject to change, thus complicating
upgrades. The traditional method for moving data to a new major version
! is to dump and reload the database. Other methods are available,
! as discussed below.
</para>
<para>
--- 1517,1525 ----
For <emphasis>major</> releases of <productname>PostgreSQL</>, the
internal data storage format is subject to change, thus complicating
upgrades. The traditional method for moving data to a new major version
! is to dump and reload the database, though this can be slow. A
! faster method is <xref linkend="pgupgrade">. Replication methods are
! also available, as discussed below.
</para>
<para>
*************** $ <userinput>kill -INT `head -1 /usr/loc
*** 1593,1604 ****
</variablelist>
! <sect2 id="upgrade-methods-pgdump">
! <title>Upgrading Data via <application>pg_dump</></title>
<para>
! To dump data from one major version of <productname>PostgreSQL</> and
! reload it in another, you must use <application>pg_dump</>; file system
level backup methods will not work. (There are checks in place that prevent
you from using a data directory with an incompatible version of
<productname>PostgreSQL</productname>, so no great harm can be done by
--- 1594,1607 ----
</variablelist>
! <sect2 id="upgrading-via-pgdumpall">
! <title>Upgrading Data via <application>pg_dumpall</></title>
<para>
! One upgrade method is to dump data from one major version of
! <productname>PostgreSQL</> and reload it in another — to do
! this, you must use a <emphasis>logical</> backup tool like
! <application>pg_dumpall</>; file system
level backup methods will not work. (There are checks in place that prevent
you from using a data directory with an incompatible version of
<productname>PostgreSQL</productname>, so no great harm can be done by
*************** $ <userinput>kill -INT `head -1 /usr/loc
*** 1607,1613 ****
<para>
It is recommended that you use the <application>pg_dump</> and
! <application>pg_dumpall</> programs from the newer version of
<productname>PostgreSQL</>, to take advantage of enhancements
that might have been made in these programs. Current releases of the
dump programs can read data from any server version back to 7.0.
--- 1610,1617 ----
<para>
It is recommended that you use the <application>pg_dump</> and
! <application>pg_dumpall</> programs from the <emphasis>newer</>
! version of
<productname>PostgreSQL</>, to take advantage of enhancements
that might have been made in these programs. Current releases of the
dump programs can read data from any server version back to 7.0.
*************** $ <userinput>kill -INT `head -1 /usr/loc
*** 1642,1655 ****
<screen>
<userinput>pg_dumpall > <replaceable>outputfile</></userinput>
</screen>
- If you need to preserve OIDs (such as when using them as
- foreign keys), then use the <option>-o</option> option when running
- <application>pg_dumpall</>.
</para>
<para>
To make the backup, you can use the <application>pg_dumpall</application>
! command from the version you are currently running. For best
results, however, try to use the <application>pg_dumpall</application>
command from <productname>PostgreSQL</productname> &version;,
since this version contains bug fixes and improvements over older
--- 1646,1657 ----
<screen>
<userinput>pg_dumpall > <replaceable>outputfile</></userinput>
</screen>
</para>
<para>
To make the backup, you can use the <application>pg_dumpall</application>
! command from the version you are currently running; see <xref
! linkend="backup-dump-all"> for more details. For best
results, however, try to use the <application>pg_dumpall</application>
command from <productname>PostgreSQL</productname> &version;,
since this version contains bug fixes and improvements over older
*************** $ <userinput>kill -INT `head -1 /usr/loc
*** 1683,1689 ****
<step>
<para>
If restoring from backup, rename or delete the old installation
! directory. It is a good idea to rename the directory, rather than
delete it, in case you have trouble and need to revert to it. Keep
in mind the directory might consume significant disk space. To rename
the directory, use a command like this:
--- 1685,1692 ----
<step>
<para>
If restoring from backup, rename or delete the old installation
! directory if it is not version-specific. It is a good idea to
! rename the directory, rather than
delete it, in case you have trouble and need to revert to it. Keep
in mind the directory might consume significant disk space. To rename
the directory, use a command like this:
*************** pg_dumpall -p 5432 | psql -d postgres -p
*** 1755,1770 ****
</sect2>
! <sect2 id="upgrading-methods-other">
! <title>Non-Dump Upgrade Methods</title>
<para>
! The <link linkend="pgupgrade">pg_upgrade</link> module allows an
! installation to be migrated in-place from one major
! <productname>PostgreSQL</> version to the next. Upgrades can be
! performed in minutes.
</para>
<para>
It is also possible to use certain replication methods, such as
<productname>Slony</>, to create a standby server with the updated version of
--- 1758,1781 ----
</sect2>
! <sect2 id="upgrading-via-pg-upgrade">
! <title>Upgrading Data via <application>pg_upgrade</></title>
<para>
! The <xref linkend="pgupgrade"> module allows an installation to
! be migrated in-place from one major <productname>PostgreSQL</>
! version to another. Upgrades can be performed in minutes,
! particularly with <option>--link</> mode. It requires steps similar to
! <application>pg_dumpall</> above, e.g. starting/stopping the server,
! running <application>initdb</>. The <application>pg_upgrade</> <link
! linkend="pgupgrade">documentation</> outlines the necessary steps.
</para>
+ </sect2>
+
+ <sect2 id="upgrading-via-replication">
+ <title>Upgrading Data via Replication</title>
+
<para>
It is also possible to use certain replication methods, such as
<productname>Slony</>, to create a standby server with the updated version of