mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
First pass at schema-fying pg_dump/pg_restore. Much to do still,
but the basic capability seems to work.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.44 2002/04/21 19:02:39 thomas Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.45 2002/05/10 22:36:26 tgl Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@ -407,10 +407,11 @@ PostgreSQL documentation
|
||||
<term><option>--superuser=<replaceable class="parameter">username</replaceable></option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The scripts or archives created by <command>pg_dump</command>
|
||||
need to have superuser access in certain cases, such as when
|
||||
disabling triggers or setting ownership of schema elements.
|
||||
This option specifies the user name to use for those cases.
|
||||
Specify the superuser user name to use when disabling triggers.
|
||||
This is only relevant if <option>--disable-triggers</> is used.
|
||||
(Usually, it's better to specify
|
||||
<option>--use-set-session-authorization</>, and then start the
|
||||
resulting script as superuser.)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -481,6 +482,36 @@ PostgreSQL documentation
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-X disable-triggers</></term>
|
||||
<term><option>--disable-triggers</></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This option is only relevant when creating a data-only dump.
|
||||
It instructs <command>pg_dump</command> to include commands
|
||||
to temporarily disable triggers on the target tables while
|
||||
the data is reloaded. Use this if you have referential
|
||||
integrity checks or other triggers on the tables that you
|
||||
do not want to invoke during data reload.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Presently, the commands emitted for <option>--disable-triggers</>
|
||||
must be done as superuser. So, you should also specify
|
||||
a superuser name with <option>-S</>, or preferably specify
|
||||
<option>--use-set-session-authorization</> and then be careful to
|
||||
start the resulting script as a superuser. If you give neither
|
||||
option, the entire script must be run as superuser.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This option is only meaningful for the plain-text format. For
|
||||
the other formats, you may specify the option when you
|
||||
call <command>pg_restore</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-Z <replaceable class="parameter">0..9</replaceable></option></term>
|
||||
<term><option>--compress=<replaceable class="parameter">0..9</replaceable></option></term>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.24 2002/04/21 19:02:39 thomas Exp $ -->
|
||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.25 2002/05/10 22:36:26 tgl Exp $ -->
|
||||
|
||||
<refentry id="APP-PGRESTORE">
|
||||
<docinfo>
|
||||
@ -336,8 +336,8 @@
|
||||
<term><option>--superuser=<replaceable class="parameter">username</replaceable></option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the superuser user name to use when disabling triggers and/or setting ownership of schema elements.
|
||||
By default, <COMMAND>pg_restore</COMMAND> will use the current user name if it is a superuser.
|
||||
Specify the superuser user name to use when disabling triggers.
|
||||
This is only relevant if <option>--disable-triggers</> is used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -402,6 +402,29 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-X disable-triggers</></term>
|
||||
<term><option>--disable-triggers</></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This option is only relevant when performing a data-only restore.
|
||||
It instructs <command>pg_restore</command> to execute commands
|
||||
to temporarily disable triggers on the target tables while
|
||||
the data is reloaded. Use this if you have referential
|
||||
integrity checks or other triggers on the tables that you
|
||||
do not want to invoke during data reload.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Presently, the commands emitted for <option>--disable-triggers</>
|
||||
must be done as superuser. So, you should also specify
|
||||
a superuser name with <option>-S</>, or preferably specify
|
||||
<option>--use-set-session-authorization</> and run
|
||||
<command>pg_restore</command> as a superuser.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
|
Reference in New Issue
Block a user