mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-15 08:20:16 +08:00
pg_dump and pg_restore man pages need to mention that one should restore
into a virgin database, ie, one created from template0, if there are any site-local additions in template1.
This commit is contained in:
parent
d99fb0d909
commit
906254a53c
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.41 2001/12/08 03:24:37 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.42 2002/02/11 00:14:10 tgl Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -603,8 +603,21 @@ connectDBStart() -- connect() failed: No such file or directory
|
|||||||
|
|
||||||
<refsect1 id="pg-dump-notes">
|
<refsect1 id="pg-dump-notes">
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>pg_dump</command> has a few limitations.
|
If your installation has any local additions to the template1 database,
|
||||||
|
be careful to restore the output of <command>pg_dump</command> into a
|
||||||
|
truly empty database; otherwise you are likely to get errors due to
|
||||||
|
duplicate definitions of the added objects. To make an empty database
|
||||||
|
without any local additions, copy from template0 not template1,
|
||||||
|
for example:
|
||||||
|
<programlisting>
|
||||||
|
CREATE DATABASE foo WITH TEMPLATE = template0;
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<command>pg_dump</command> has a few limitations:
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.21 2001/11/28 20:49:10 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.22 2002/02/11 00:14:10 tgl Exp $ -->
|
||||||
|
|
||||||
<refentry id="APP-PGRESTORE">
|
<refentry id="APP-PGRESTORE">
|
||||||
<docinfo>
|
<docinfo>
|
||||||
@ -513,13 +513,25 @@ connectDBStart() -- connect() failed: No such file or directory
|
|||||||
Notes
|
Notes
|
||||||
</title>
|
</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If your installation has any local additions to the template1 database,
|
||||||
|
be careful to load the output of <command>pg_restore</command> into a
|
||||||
|
truly empty database; otherwise you are likely to get errors due to
|
||||||
|
duplicate definitions of the added objects. To make an empty database
|
||||||
|
without any local additions, copy from template0 not template1,
|
||||||
|
for example:
|
||||||
|
<programlisting>
|
||||||
|
CREATE DATABASE foo WITH TEMPLATE = template0;
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The limitations of <command>pg_restore</command> are detailed below.
|
The limitations of <command>pg_restore</command> are detailed below.
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
When restoring data to a table, <command>pg_restore</command> emits queries
|
When restoring data to a pre-existing table, <command>pg_restore</command> emits queries
|
||||||
to disable triggers on user tables before inserting the data then emits queries to
|
to disable triggers on user tables before inserting the data then emits queries to
|
||||||
re-enable them after the data has been inserted. If the restore is stopped in the
|
re-enable them after the data has been inserted. If the restore is stopped in the
|
||||||
middle, the system catalogs may be left in the wrong state.
|
middle, the system catalogs may be left in the wrong state.
|
||||||
@ -538,7 +550,7 @@ connectDBStart() -- connect() failed: No such file or directory
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
See the <xref linkend="app-pgdump"> documentation for details on
|
See the <xref linkend="app-pgdump"> documentation for details on
|
||||||
limitation of <command>pg_dump</command>.
|
limitations of <command>pg_dump</command>.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user