Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9f0ae0c

Browse files
committed
First pass at schema-fying pg_dump/pg_restore. Much to do still,
but the basic capability seems to work.
1 parent1011fb6 commit9f0ae0c

File tree

13 files changed

+4421
-4085
lines changed

13 files changed

+4421
-4085
lines changed

‎doc/src/sgml/ref/pg_dump.sgml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.44 2002/04/21 19:02:39 thomas Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.45 2002/05/10 22:36:26 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -407,10 +407,11 @@ PostgreSQL documentation
407407
<term><option>--superuser=<replaceable class="parameter">username</replaceable></option></term>
408408
<listitem>
409409
<para>
410-
The scripts or archives created by <command>pg_dump</command>
411-
need to have superuser access in certain cases, such as when
412-
disabling triggers or setting ownership of schema elements.
413-
This option specifies the user name to use for those cases.
410+
Specify the superuser user name to use when disabling triggers.
411+
This is only relevant if <option>--disable-triggers</> is used.
412+
(Usually, it's better to specify
413+
<option>--use-set-session-authorization</>, and then start the
414+
resulting script as superuser.)
414415
</para>
415416
</listitem>
416417
</varlistentry>
@@ -481,6 +482,36 @@ PostgreSQL documentation
481482
</listitem>
482483
</varlistentry>
483484

485+
<varlistentry>
486+
<term><option>-X disable-triggers</></term>
487+
<term><option>--disable-triggers</></term>
488+
<listitem>
489+
<para>
490+
This option is only relevant when creating a data-only dump.
491+
It instructs <command>pg_dump</command> to include commands
492+
to temporarily disable triggers on the target tables while
493+
the data is reloaded. Use this if you have referential
494+
integrity checks or other triggers on the tables that you
495+
do not want to invoke during data reload.
496+
</para>
497+
498+
<para>
499+
Presently, the commands emitted for <option>--disable-triggers</>
500+
must be done as superuser. So, you should also specify
501+
a superuser name with <option>-S</>, or preferably specify
502+
<option>--use-set-session-authorization</> and then be careful to
503+
start the resulting script as a superuser. If you give neither
504+
option, the entire script must be run as superuser.
505+
</para>
506+
507+
<para>
508+
This option is only meaningful for the plain-text format. For
509+
the other formats, you may specify the option when you
510+
call <command>pg_restore</command>.
511+
</para>
512+
</listitem>
513+
</varlistentry>
514+
484515
<varlistentry>
485516
<term><option>-Z <replaceable class="parameter">0..9</replaceable></option></term>
486517
<term><option>--compress=<replaceable class="parameter">0..9</replaceable></option></term>

‎doc/src/sgml/ref/pg_restore.sgml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.24 2002/04/21 19:02:39 thomas Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.25 2002/05/10 22:36:26 tgl Exp $ -->
22

33
<refentry id="APP-PGRESTORE">
44
<docinfo>
@@ -336,8 +336,8 @@
336336
<term><option>--superuser=<replaceable class="parameter">username</replaceable></option></term>
337337
<listitem>
338338
<para>
339-
Specify the superuser user name to use when disabling triggers and/or setting ownership of schema elements.
340-
By default, <COMMAND>pg_restore</COMMAND> will use the current user name if itisa superuser.
339+
Specify the superuser user name to use when disabling triggers.
340+
This is only relevant if <option>--disable-triggers</>isused.
341341
</para>
342342
</listitem>
343343
</varlistentry>
@@ -402,6 +402,29 @@
402402
</listitem>
403403
</varlistentry>
404404

405+
<varlistentry>
406+
<term><option>-X disable-triggers</></term>
407+
<term><option>--disable-triggers</></term>
408+
<listitem>
409+
<para>
410+
This option is only relevant when performing a data-only restore.
411+
It instructs <command>pg_restore</command> to execute commands
412+
to temporarily disable triggers on the target tables while
413+
the data is reloaded. Use this if you have referential
414+
integrity checks or other triggers on the tables that you
415+
do not want to invoke during data reload.
416+
</para>
417+
418+
<para>
419+
Presently, the commands emitted for <option>--disable-triggers</>
420+
must be done as superuser. So, you should also specify
421+
a superuser name with <option>-S</>, or preferably specify
422+
<option>--use-set-session-authorization</> and run
423+
<command>pg_restore</command> as a superuser.
424+
</para>
425+
</listitem>
426+
</varlistentry>
427+
405428
</variablelist>
406429
</para>
407430

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp