summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane2005-06-21 20:45:44 +0000
committerTom Lane2005-06-21 20:45:44 +0000
commit7a28de20523bb695e8ec819514df82a18a7656b3 (patch)
tree4427292f4323028cfbcb501c8dcb716caa2a8ddc /doc/src
parentb49d871f6ac58ff63a3147575494fb8fe9c6a5eb (diff)
pg_dump can now dump large objects even in plain-text output mode, by
using the recently added lo_create() function. The restore logic in pg_restore is greatly simplified as well, since there's no need anymore to try to adjust database references to match a new set of blob OIDs.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/backup.sgml28
-rw-r--r--doc/src/sgml/installation.sgml10
-rw-r--r--doc/src/sgml/ref/pg_dump.sgml35
-rw-r--r--doc/src/sgml/ref/pg_dumpall.sgml12
-rw-r--r--doc/src/sgml/ref/pg_restore.sgml25
5 files changed, 23 insertions, 87 deletions
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index cf8244679e9..ba55eb634ae 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.67 2005/06/21 04:02:29 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.68 2005/06/21 20:45:43 tgl Exp $
-->
<chapter id="backup">
<title>Backup and Restore</title>
@@ -88,9 +88,7 @@ pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable cl
When 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. <quote>Large objects</> are not dumped by default,
- either. See <xref linkend="app-pgdump">'s reference page if you
- use large objects.
+ option.
</para>
</important>
@@ -267,28 +265,6 @@ pg_dump -Fc <replaceable class="parameter">dbname</replaceable> &gt; <replaceabl
</formalpara>
</sect2>
-
- <sect2 id="backup-dump-caveats">
- <title>Caveats</title>
-
- <para>
- For reasons of backward compatibility, <application>pg_dump</>
- does not dump large objects by default.<indexterm><primary>large
- object</primary><secondary>backup</secondary></indexterm> To dump
- large objects you must use either the custom or the tar output
- format, and use the <option>-b</> option in
- <application>pg_dump</>. See the <xref linkend="app-pgdump"> reference
- page for details. The
- directory <filename>contrib/pg_dumplo</> of the
- <productname>PostgreSQL</> source tree also contains a program
- that can dump large objects.
- </para>
-
- <para>
- Please familiarize yourself with the <xref linkend="app-pgdump">
- reference page.
- </para>
- </sect2>
</sect1>
<sect1 id="backup-file">
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index b605ea23ddd..547dd6436de 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.236 2005/06/21 04:02:29 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.237 2005/06/21 20:45:43 tgl Exp $ -->
<chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -390,14 +390,6 @@ su - postgres
</para>
<para>
- <application>pg_dumpall</application> does not
- save large objects. Check
- <![%standalone-include[the documentation]]>
- <![%standalone-ignore[<xref linkend="backup-dump-caveats">]]>
- if you need to do this.
- </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>
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index f717e6d2385..978fe29f0aa 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.77 2005/05/29 03:32:18 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.78 2005/06/21 20:45:43 tgl Exp $
PostgreSQL documentation
-->
@@ -60,9 +60,8 @@ PostgreSQL documentation
<xref linkend="app-pgrestore"> to rebuild the database. They
allow <application>pg_restore</application> to be selective about
what is restored, or even to reorder the items prior to being
- restored. The archive formats also allow saving and restoring
- <quote>large objects</>, which is not possible in a script dump.
- The archive files are also designed to be portable across
+ restored.
+ The archive file formats are designed to be portable across
architectures.
</para>
@@ -128,17 +127,6 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
- <term><option>-b</></term>
- <term><option>--blobs</></term>
- <listitem>
- <para>
- Include large objects in the dump. A non-text output format
- must be selected.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><option>-c</option></term>
<term><option>--clean</option></term>
<listitem>
@@ -602,14 +590,6 @@ CREATE DATABASE foo WITH TEMPLATE template0;
<itemizedlist>
<listitem>
<para>
- When dumping a single table or as plain text, <application>pg_dump</application>
- does not handle large objects. Large objects must be dumped with the
- entire database using one of the non-text archive formats.
- </para>
- </listitem>
-
- <listitem>
- <para>
When a data-only dump is chosen and the option
<option>--disable-triggers</> is used,
<application>pg_dump</application> emits commands to disable
@@ -660,17 +640,16 @@ CREATE DATABASE foo WITH TEMPLATE template0;
</para>
<para>
- To dump a database called <literal>mydb</> that contains
- large objects to a <filename>tar</filename> file:
+ To dump a database called <literal>mydb</> to a <filename>tar</filename>
+ file:
<screen>
-<prompt>$</prompt> <userinput>pg_dump -Ft -b mydb &gt; db.tar</userinput>
+<prompt>$</prompt> <userinput>pg_dump -Ft mydb &gt; db.tar</userinput>
</screen>
</para>
<para>
- To reload this database (with large objects) to an
- existing database called <literal>newdb</>:
+ To reload this dump into an existing database called <literal>newdb</>:
<screen>
<prompt>$</prompt> <userinput>pg_restore -d newdb db.tar</userinput>
diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml
index 857cb1a8a6a..c61ae094042 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.50 2005/06/21 04:02:31 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.51 2005/06/21 20:45:43 tgl Exp $
PostgreSQL documentation
-->
@@ -44,16 +44,6 @@ PostgreSQL documentation
</para>
<para>
- Thus, <application>pg_dumpall</application> is an integrated
- solution for backing up your databases. But note a limitation:
- it cannot dump <quote>large objects</quote>, since
- <application>pg_dump</application> cannot dump such objects into
- text files. If you have databases containing large objects,
- they should be dumped using one of <application>pg_dump</application>'s
- non-text output modes.
- </para>
-
- <para>
Since <application>pg_dumpall</application> reads tables from all
databases you will most likely have to connect as a database
superuser in order to produce a complete dump. Also you will need
diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml
index 54afdb154d9..9b2b5fc3f26 100644
--- a/doc/src/sgml/ref/pg_restore.sgml
+++ b/doc/src/sgml/ref/pg_restore.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.52 2005/06/09 17:56:51 momjian Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.53 2005/06/21 20:45:43 tgl Exp $ -->
<refentry id="APP-PGRESTORE">
<refmeta>
@@ -44,14 +44,13 @@
</para>
<para>
- <application>pg_restore</application> can operate in two modes: If
- a database name is specified, the archive is restored directly into
- the database. (Large objects can only be restored by using such a direct
- database connection.) Otherwise, a script containing the SQL
- commands necessary to rebuild the database is created (and written
- to a file or standard output), similar to the ones created by the
- <application>pg_dump</application> plain text format. Some of the
- options controlling the script output are therefore analogous to
+ <application>pg_restore</application> can operate in two modes.
+ If a database name is specified, the archive is restored directly into
+ the database. Otherwise, a script containing the SQL
+ commands necessary to rebuild the database is created and written
+ to a file or standard output. The script output is equivalent to
+ the plain text output format of <application>pg_dump</application>.
+ Some of the options controlling the output are therefore analogous to
<application>pg_dump</application> options.
</para>
@@ -541,16 +540,16 @@ CREATE DATABASE foo WITH TEMPLATE template0;
<title>Examples</title>
<para>
- To dump a database called <literal>mydb</> that contains
- large objects to a <filename>tar</filename> file:
+ To dump a database called <literal>mydb</> to a <filename>tar</filename>
+ file:
<screen>
-<prompt>$</prompt> <userinput>pg_dump -Ft -b mydb &gt; db.tar</userinput>
+<prompt>$</prompt> <userinput>pg_dump -Ft mydb &gt; db.tar</userinput>
</screen>
</para>
<para>
- To reload this database (with large objects) to an
+ To reload this dump into an
existing database called <literal>newdb</>:
<screen>