Skip to content

Commit 7e2a4cf

Browse files
committed
Make documentation of pg_restore's -N, -o, -r switches bear some
slight resemblance to their actual behavior.
1 parent 209a8d6 commit 7e2a4cf

File tree

1 file changed

+30
-20
lines changed

1 file changed

+30
-20
lines changed

doc/src/sgml/ref/pg_restore.sgml

Lines changed: 30 additions & 20 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.39 2003/06/11 16:29:42 tgl Exp $ -->
1+
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.40 2003/08/28 20:44:02 tgl Exp $ -->
22

33
<refentry id="APP-PGRESTORE">
44
<refmeta>
@@ -42,8 +42,8 @@
4242
<para>
4343
<application>pg_restore</application> can operate in two modes: If
4444
a database name is specified, the archive is restored directly into
45-
the database. Large objects can only be restored by using a direct
46-
database connection. Otherwise, a script containing the SQL
45+
the database. (Large objects can only be restored by using such a direct
46+
database connection.) Otherwise, a script containing the SQL
4747
commands necessary to rebuild the database is created (and written
4848
to a file or standard output), similar to the ones created by the
4949
<application>pg_dump</application> plain text format. Some of the
@@ -228,11 +228,13 @@
228228
<term><option>--orig-order</option></term>
229229
<listitem>
230230
<para>
231-
Restore items in the original dump order. By default
232-
<application>pg_dump</application> will dump items in an order
233-
convenient to <application>pg_dump</application>, then save the
234-
archive in a modified OID order. This option overrides the OID
235-
ordering.
231+
Restore items in the order they were originally generated within
232+
<application>pg_dump</application>. This option has no known
233+
practical use, since <application>pg_dump</application> generates
234+
the items in an order convenient to it, which is unlikely to be a
235+
safe order for restoring them. (This is <emphasis>not</> the order
236+
in which the items are ultimately listed in the archive's table of
237+
contents.) See also <option>-r</>.
236238
</para>
237239
</listitem>
238240
</varlistentry>
@@ -242,11 +244,10 @@
242244
<term><option>--oid-order</option></term>
243245
<listitem>
244246
<para>
245-
Restore items in the OID order. By default
246-
<application>pg_dump</application> will dump items in an order
247-
convenient to <application>pg_dump</application>, then save the
248-
archive in a modified OID order. This option enforces strict
249-
OID ordering.
247+
Restore items in order by OID. This option is of limited usefulness,
248+
since OID is only an approximate indication of original creation
249+
order. This option overrides <option>-N</> if both are specified.
250+
See also <option>-r</>.
250251
</para>
251252
</listitem>
252253
</varlistentry>
@@ -281,13 +282,22 @@
281282
<term><option>--rearrange</option></term>
282283
<listitem>
283284
<para>
284-
Restore items in modified OID order. By default
285-
<application>pg_dump</application> will dump items in an order
286-
convenient to <application>pg_dump</application>, then save the
287-
archive in a modified OID order. Most objects will be restored
288-
in OID order, but some things (e.g., rules and indexes) will
289-
be restored at the end of the process irrespective of their
290-
OIDs. This option is the default.
285+
Rearrange items by object type (this occurs after the sorting
286+
specified by <option>-N</option> or <option>-o</option>, if
287+
given). The rearrangement is intended to give the best possible
288+
restore performance.
289+
</para>
290+
291+
<para>
292+
When none of <option>-N</option>, <option>-o</option>, and
293+
<option>-r</> appear, <application>pg_restore</application> restores
294+
items in the order they appear in the dump's table of contents,
295+
or in the order they appear in the <REPLACEABLE
296+
CLASS="PARAMETER">list-file</REPLACEABLE> if <option>-L</> is
297+
given. The combination of <option>-o</> and <option>-r</>
298+
duplicates the sorting done by <application>pg_dump</application>
299+
before creating the dump's table of contents,
300+
and so it is normally unnecessary to specify it.
291301
</para>
292302
</listitem>
293303
</varlistentry>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy