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

Commit3439e40

Browse files
committed
Put options in some sensible order
For the --help output and reference pages of pg_dump, pg_dumpall,pg_restore, put the options in some consistent, mostly alphabetical,and consistent order, rather than newest option last or something likethat.
1 parent8c3604a commit3439e40

File tree

6 files changed

+197
-197
lines changed

6 files changed

+197
-197
lines changed

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

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -558,25 +558,6 @@ PostgreSQL documentation
558558
</listitem>
559559
</varlistentry>
560560

561-
<varlistentry>
562-
<term><option>--inserts</option></term>
563-
<listitem>
564-
<para>
565-
Dump data as <command>INSERT</command> commands (rather
566-
than <command>COPY</command>). This will make restoration very slow;
567-
it is mainly useful for making dumps that can be loaded into
568-
non-<productname>PostgreSQL</productname> databases.
569-
However, since this option generates a separate command for each row,
570-
an error in reloading a row causes only that row to be lost rather
571-
than the entire table contents.
572-
Note that
573-
the restore might fail altogether if you have rearranged column order.
574-
The <option>--column-inserts</option> option is safe against column
575-
order changes, though even slower.
576-
</para>
577-
</listitem>
578-
</varlistentry>
579-
580561
<varlistentry>
581562
<term><option>--column-inserts</option></term>
582563
<term><option>--attribute-inserts</option></term>
@@ -633,6 +614,25 @@ PostgreSQL documentation
633614
</listitem>
634615
</varlistentry>
635616

617+
<varlistentry>
618+
<term><option>--inserts</option></term>
619+
<listitem>
620+
<para>
621+
Dump data as <command>INSERT</command> commands (rather
622+
than <command>COPY</command>). This will make restoration very slow;
623+
it is mainly useful for making dumps that can be loaded into
624+
non-<productname>PostgreSQL</productname> databases.
625+
However, since this option generates a separate command for each row,
626+
an error in reloading a row causes only that row to be lost rather
627+
than the entire table contents.
628+
Note that
629+
the restore might fail altogether if you have rearranged column order.
630+
The <option>--column-inserts</option> option is safe against column
631+
order changes, though even slower.
632+
</para>
633+
</listitem>
634+
</varlistentry>
635+
636636
<varlistentry>
637637
<term><option>--lock-wait-timeout=<replaceable class="parameter">timeout</replaceable></option></term>
638638
<listitem>
@@ -650,36 +650,10 @@ PostgreSQL documentation
650650
</varlistentry>
651651

652652
<varlistentry>
653-
<term><option>--serializable-deferrable</option></term>
653+
<term><option>--no-security-labels</option></term>
654654
<listitem>
655655
<para>
656-
Use a <literal>serializable</literal> transaction for the dump, to
657-
ensure that the snapshot used is consistent with later database
658-
states; but do this by waiting for a point in the transaction stream
659-
at which no anomalies can be present, so that there isn't a risk of
660-
the dump failing or causing other transactions to roll back with a
661-
<literal>serialization_failure</literal>. See <xref linkend="mvcc">
662-
for more information about transaction isolation and concurrency
663-
control.
664-
</para>
665-
666-
<para>
667-
This option is not beneficial for a dump which is intended only for
668-
disaster recovery. It could be useful for a dump used to load a
669-
copy of the database for reporting or other read-only load sharing
670-
while the original database continues to be updated. Without it the
671-
dump may reflect a state which is not consistent with any serial
672-
execution of the transactions eventually committed. For example, if
673-
batch processing techniques are used, a batch may show as closed in
674-
the dump without all of the items which are in the batch appearing.
675-
</para>
676-
677-
<para>
678-
This option will make no difference if there are no read-write
679-
transactions active when pg_dump is started. If read-write
680-
transactions are active, the start of the dump may be delayed for an
681-
indeterminate length of time. Once running, performance with or
682-
without the switch is the same.
656+
Do not dump security labels.
683657
</para>
684658
</listitem>
685659
</varlistentry>
@@ -702,47 +676,73 @@ PostgreSQL documentation
702676
</varlistentry>
703677

704678
<varlistentry>
705-
<term><option>--no-security-labels</option></term>
679+
<term><option>--no-unlogged-table-data</option></term>
706680
<listitem>
707681
<para>
708-
Do not dump security labels.
682+
Do not dump the contents of unlogged tables. This option has no
683+
effect on whether or not the table definitions (schema) are dumped;
684+
it only suppresses dumping the table data.
709685
</para>
710686
</listitem>
711687
</varlistentry>
712688

713689
<varlistentry>
714-
<term><option>--use-set-session-authorization</></term>
690+
<term><option>--quote-all-identifiers</></term>
715691
<listitem>
716692
<para>
717-
Output SQL-standard <command>SET SESSION AUTHORIZATION</> commands
718-
instead of <command>ALTER OWNER</> commands to determine object
719-
ownership. This makes the dump more standards-compatible, but
720-
depending on the history of the objects in the dump, might not restore
721-
properly. Also, a dump using <command>SET SESSION AUTHORIZATION</>
722-
will certainly require superuser privileges to restore correctly,
723-
whereas <command>ALTER OWNER</> requires lesser privileges.
693+
Force quoting of all identifiers. This may be useful when dumping a
694+
database for migration to a future version that may have introduced
695+
additional keywords.
724696
</para>
725697
</listitem>
726698
</varlistentry>
727699

728700
<varlistentry>
729-
<term><option>--no-unlogged-table-data</option></term>
701+
<term><option>--serializable-deferrable</option></term>
730702
<listitem>
731703
<para>
732-
Do not dump the contents of unlogged tables. This option has no
733-
effect on whether or not the table definitions (schema) are dumped;
734-
it only suppresses dumping the table data.
704+
Use a <literal>serializable</literal> transaction for the dump, to
705+
ensure that the snapshot used is consistent with later database
706+
states; but do this by waiting for a point in the transaction stream
707+
at which no anomalies can be present, so that there isn't a risk of
708+
the dump failing or causing other transactions to roll back with a
709+
<literal>serialization_failure</literal>. See <xref linkend="mvcc">
710+
for more information about transaction isolation and concurrency
711+
control.
712+
</para>
713+
714+
<para>
715+
This option is not beneficial for a dump which is intended only for
716+
disaster recovery. It could be useful for a dump used to load a
717+
copy of the database for reporting or other read-only load sharing
718+
while the original database continues to be updated. Without it the
719+
dump may reflect a state which is not consistent with any serial
720+
execution of the transactions eventually committed. For example, if
721+
batch processing techniques are used, a batch may show as closed in
722+
the dump without all of the items which are in the batch appearing.
723+
</para>
724+
725+
<para>
726+
This option will make no difference if there are no read-write
727+
transactions active when pg_dump is started. If read-write
728+
transactions are active, the start of the dump may be delayed for an
729+
indeterminate length of time. Once running, performance with or
730+
without the switch is the same.
735731
</para>
736732
</listitem>
737733
</varlistentry>
738734

739735
<varlistentry>
740-
<term><option>--quote-all-identifiers</></term>
736+
<term><option>--use-set-session-authorization</></term>
741737
<listitem>
742738
<para>
743-
Force quoting of all identifiers. This may be useful when dumping a
744-
database for migration to a future version that may have introduced
745-
additional keywords.
739+
Output SQL-standard <command>SET SESSION AUTHORIZATION</> commands
740+
instead of <command>ALTER OWNER</> commands to determine object
741+
ownership. This makes the dump more standards-compatible, but
742+
depending on the history of the objects in the dump, might not restore
743+
properly. Also, a dump using <command>SET SESSION AUTHORIZATION</>
744+
will certainly require superuser privileges to restore correctly,
745+
whereas <command>ALTER OWNER</> requires lesser privileges.
746746
</para>
747747
</listitem>
748748
</varlistentry>

‎doc/src/sgml/ref/pg_dumpall.sgml

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -164,54 +164,6 @@ PostgreSQL documentation
164164
</listitem>
165165
</varlistentry>
166166

167-
<varlistentry>
168-
<term><option>--lock-wait-timeout=<replaceable class="parameter">timeout</replaceable></option></term>
169-
<listitem>
170-
<para>
171-
Do not wait forever to acquire shared table locks at the beginning of
172-
the dump. Instead, fail if unable to lock a table within the specified
173-
<replaceable class="parameter">timeout</>. The timeout may be
174-
specified in any of the formats accepted by <command>SET
175-
statement_timeout</>. Allowed values vary depending on the server
176-
version you are dumping from, but an integer number of milliseconds
177-
is accepted by all versions since 7.3. This option is ignored when
178-
dumping from a pre-7.3 server.
179-
</para>
180-
</listitem>
181-
</varlistentry>
182-
183-
<varlistentry>
184-
<term><option>--no-tablespaces</option></term>
185-
<listitem>
186-
<para>
187-
Do not output commands to create tablespaces nor select tablespaces
188-
for objects.
189-
With this option, all objects will be created in whichever
190-
tablespace is the default during restore.
191-
</para>
192-
</listitem>
193-
</varlistentry>
194-
195-
<varlistentry>
196-
<term><option>--no-security-labels</option></term>
197-
<listitem>
198-
<para>
199-
Do not dump security labels.
200-
</para>
201-
</listitem>
202-
</varlistentry>
203-
204-
<varlistentry>
205-
<term><option>--no-unlogged-table-data</option></term>
206-
<listitem>
207-
<para>
208-
Do not dump the contents of unlogged tables. This option has no
209-
effect on whether or not the table definitions (schema) are dumped;
210-
it only suppresses dumping the table data.
211-
</para>
212-
</listitem>
213-
</varlistentry>
214-
215167
<varlistentry>
216168
<term><option>-r</option></term>
217169
<term><option>--roles-only</option></term>
@@ -301,21 +253,6 @@ PostgreSQL documentation
301253
</listitem>
302254
</varlistentry>
303255

304-
<varlistentry>
305-
<term><option>--inserts</option></term>
306-
<listitem>
307-
<para>
308-
Dump data as <command>INSERT</command> commands (rather
309-
than <command>COPY</command>). This will make restoration very slow;
310-
it is mainly useful for making dumps that can be loaded into
311-
non-<productname>PostgreSQL</productname> databases. Note that
312-
the restore might fail altogether if you have rearranged column order.
313-
The <option>--column-inserts</option> option is safer, though even
314-
slower.
315-
</para>
316-
</listitem>
317-
</varlistentry>
318-
319256
<varlistentry>
320257
<term><option>--column-inserts</option></term>
321258
<term><option>--attribute-inserts</option></term>
@@ -364,14 +301,64 @@ PostgreSQL documentation
364301
</varlistentry>
365302

366303
<varlistentry>
367-
<term><option>--use-set-session-authorization</></term>
304+
<term><option>--inserts</option></term>
368305
<listitem>
369306
<para>
370-
Output SQL-standard <command>SET SESSION AUTHORIZATION</> commands
371-
instead of <command>ALTER OWNER</> commands to determine object
372-
ownership. This makes the dump more standards compatible, but
373-
depending on the history of the objects in the dump, might not restore
374-
properly.
307+
Dump data as <command>INSERT</command> commands (rather
308+
than <command>COPY</command>). This will make restoration very slow;
309+
it is mainly useful for making dumps that can be loaded into
310+
non-<productname>PostgreSQL</productname> databases. Note that
311+
the restore might fail altogether if you have rearranged column order.
312+
The <option>--column-inserts</option> option is safer, though even
313+
slower.
314+
</para>
315+
</listitem>
316+
</varlistentry>
317+
318+
<varlistentry>
319+
<term><option>--lock-wait-timeout=<replaceable class="parameter">timeout</replaceable></option></term>
320+
<listitem>
321+
<para>
322+
Do not wait forever to acquire shared table locks at the beginning of
323+
the dump. Instead, fail if unable to lock a table within the specified
324+
<replaceable class="parameter">timeout</>. The timeout may be
325+
specified in any of the formats accepted by <command>SET
326+
statement_timeout</>. Allowed values vary depending on the server
327+
version you are dumping from, but an integer number of milliseconds
328+
is accepted by all versions since 7.3. This option is ignored when
329+
dumping from a pre-7.3 server.
330+
</para>
331+
</listitem>
332+
</varlistentry>
333+
334+
<varlistentry>
335+
<term><option>--no-security-labels</option></term>
336+
<listitem>
337+
<para>
338+
Do not dump security labels.
339+
</para>
340+
</listitem>
341+
</varlistentry>
342+
343+
<varlistentry>
344+
<term><option>--no-tablespaces</option></term>
345+
<listitem>
346+
<para>
347+
Do not output commands to create tablespaces nor select tablespaces
348+
for objects.
349+
With this option, all objects will be created in whichever
350+
tablespace is the default during restore.
351+
</para>
352+
</listitem>
353+
</varlistentry>
354+
355+
<varlistentry>
356+
<term><option>--no-unlogged-table-data</option></term>
357+
<listitem>
358+
<para>
359+
Do not dump the contents of unlogged tables. This option has no
360+
effect on whether or not the table definitions (schema) are dumped;
361+
it only suppresses dumping the table data.
375362
</para>
376363
</listitem>
377364
</varlistentry>
@@ -387,6 +374,19 @@ PostgreSQL documentation
387374
</listitem>
388375
</varlistentry>
389376

377+
<varlistentry>
378+
<term><option>--use-set-session-authorization</></term>
379+
<listitem>
380+
<para>
381+
Output SQL-standard <command>SET SESSION AUTHORIZATION</> commands
382+
instead of <command>ALTER OWNER</> commands to determine object
383+
ownership. This makes the dump more standards compatible, but
384+
depending on the history of the objects in the dump, might not restore
385+
properly.
386+
</para>
387+
</listitem>
388+
</varlistentry>
389+
390390
<varlistentry>
391391
<term><option>-?</></term>
392392
<term><option>--help</></term>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp