diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-05-10 22:36:27 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-05-10 22:36:27 +0000 |
commit | 9f0ae0c82060e3dcd1fa7ac8bbe35a3f9a44dbba (patch) | |
tree | 1949d052323eef0a1b071f65cf20f0762ae19367 /doc/src | |
parent | 1011fb651d83932805bfbbad35c2b49490e5b739 (diff) | |
download | postgresql-9f0ae0c82060e3dcd1fa7ac8bbe35a3f9a44dbba.tar.gz postgresql-9f0ae0c82060e3dcd1fa7ac8bbe35a3f9a44dbba.zip |
First pass at schema-fying pg_dump/pg_restore. Much to do still,
but the basic capability seems to work.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/pg_dump.sgml | 41 | ||||
-rw-r--r-- | doc/src/sgml/ref/pg_restore.sgml | 29 |
2 files changed, 62 insertions, 8 deletions
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index 1167128716e..d2ab719fe34 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -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> @@ -482,6 +483,36 @@ PostgreSQL documentation </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> <listitem> diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml index 3e7f2c6fcc0..aa87e2e6f44 100644 --- a/doc/src/sgml/ref/pg_restore.sgml +++ b/doc/src/sgml/ref/pg_restore.sgml @@ -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> |