@@ -76,11 +76,7 @@ PostgreSQL documentation
7676 database are to be restored. The most flexible output file format is
7777 the <quote>custom</quote> format (<option>-Fc</option>). It allows
7878 for selection and reordering of all archived items, and is compressed
79- by default. The <application>tar</application> format
80- (<option>-Ft</option>) is not compressed and has restrictions on
81- reordering data when loading, but it is otherwise quite flexible;
82- moreover, it can be manipulated with standard Unix tools such as
83- <command>tar</command>.
79+ by default.
8480 </para>
8581
8682 <para>
@@ -194,8 +190,12 @@ PostgreSQL documentation
194190 <term><option>--file=<replaceable class="parameter">file</replaceable></option></term>
195191 <listitem>
196192 <para>
197- Send output to the specified file. If this is omitted, the
198- standard output is used.
193+ Send output to the specified file. This parameter can be omitted for
194+ file based output formats, in which case the standard output is used.
195+ It must be given for the directory output format however, where it
196+ specifies the target directory instead of a file. In this case the
197+ directory is created by <command>pg_dump</command> and must not exist
198+ before.
199199 </para>
200200 </listitem>
201201 </varlistentry>
@@ -226,9 +226,28 @@ PostgreSQL documentation
226226 <para>
227227 Output a custom-format archive suitable for input into
228228 <application>pg_restore</application>.
229- This is the most flexible output format in that it allows manual
230- selection and reordering of archived items during restore.
231- This format is also compressed by default.
229+ Together with the directory output format, this is the most flexible
230+ output format in that it allows manual selection and reordering of
231+ archived items during restore. This format is also compressed by
232+ default.
233+ </para>
234+ </listitem>
235+ </varlistentry>
236+
237+ <varlistentry>
238+ <term><literal>d</></term>
239+ <term><literal>directory</></term>
240+ <listitem>
241+ <para>
242+ Output a directory-format archive suitable for input into
243+ <application>pg_restore</application>. This will create a directory
244+ with one file for each table and blob being dumped, plus a
245+ so-called Table of Contents file describing the dumped objects in a
246+ machine-readable format that <application>pg_restore</application>
247+ can read. A directory format archive can be manipulated with
248+ standard Unix tools; for example, files in an uncompressed archive
249+ can be compressed with the <application>gzip</application> tool.
250+ This format is compressed by default.
232251 </para>
233252 </listitem>
234253 </varlistentry>
@@ -239,13 +258,12 @@ PostgreSQL documentation
239258 <listitem>
240259 <para>
241260 Output a <command>tar</command>-format archive suitable for input
242- into <application>pg_restore</application>.
243- This output format allows manual selection and reordering of
244- archived items during restore, but there is a restriction: the
245- relative order of table data items cannot be changed during
246- restore. Also, <command>tar</command> format does not support
247- compression and has a limit of 8 GB on the size of individual
248- tables.
261+ into <application>pg_restore</application>. The tar-format is
262+ compatible with the directory-format; extracting a tar-format
263+ archive produces a valid directory-format archive.
264+ However, the tar-format does not support compression and has a
265+ limit of 8 GB on the size of individual tables. Also, the relative
266+ order of table data items cannot be changed during restore.
249267 </para>
250268 </listitem>
251269 </varlistentry>
@@ -946,6 +964,14 @@ CREATE DATABASE foo WITH TEMPLATE template0;
946964</screen>
947965 </para>
948966
967+ <para>
968+ To dump a database into a directory-format archive:
969+
970+ <screen>
971+ <prompt>$</prompt> <userinput>pg_dump -Fd mydb -f dumpdir</userinput>
972+ </screen>
973+ </para>
974+
949975 <para>
950976 To reload an archive file into a (freshly created) database named
951977 <literal>newdb</>:
0 commit comments