|
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 $ --> |
2 | 2 |
|
3 | 3 | <refentry id="APP-PGRESTORE">
|
4 | 4 | <refmeta>
|
|
42 | 42 | <para>
|
43 | 43 | <application>pg_restore</application> can operate in two modes: If
|
44 | 44 | 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 |
47 | 47 | commands necessary to rebuild the database is created (and written
|
48 | 48 | to a file or standard output), similar to the ones created by the
|
49 | 49 | <application>pg_dump</application> plain text format. Some of the
|
|
228 | 228 | <term><option>--orig-order</option></term>
|
229 | 229 | <listitem>
|
230 | 230 | <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</>. |
236 | 238 | </para>
|
237 | 239 | </listitem>
|
238 | 240 | </varlistentry>
|
|
242 | 244 | <term><option>--oid-order</option></term>
|
243 | 245 | <listitem>
|
244 | 246 | <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</>. |
250 | 251 | </para>
|
251 | 252 | </listitem>
|
252 | 253 | </varlistentry>
|
|
281 | 282 | <term><option>--rearrange</option></term>
|
282 | 283 | <listitem>
|
283 | 284 | <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. |
291 | 301 | </para>
|
292 | 302 | </listitem>
|
293 | 303 | </varlistentry>
|
|
0 commit comments