aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/pg_dump.sgml75
-rw-r--r--doc/src/sgml/ref/pg_dumpall.sgml41
-rw-r--r--doc/src/sgml/ref/pg_restore.sgml48
-rw-r--r--doc/src/sgml/ref/pgupgrade.sgml9
4 files changed, 152 insertions, 21 deletions
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
index 24fcc76d72c..c7a22022fa6 100644
--- a/doc/src/sgml/ref/pg_dump.sgml
+++ b/doc/src/sgml/ref/pg_dump.sgml
@@ -123,7 +123,7 @@ PostgreSQL documentation
<term><option>--data-only</option></term>
<listitem>
<para>
- Dump only the data, not the schema (data definitions).
+ Dump only the data, not the schema (data definitions) or statistics.
Table data, large objects, and sequence values are dumped.
</para>
@@ -141,13 +141,15 @@ PostgreSQL documentation
<listitem>
<para>
Include large objects in the dump. This is the default behavior
- except when <option>--schema</option>, <option>--table</option>, or
- <option>--schema-only</option> is specified. The <option>-b</option>
- switch is therefore only useful to add large objects to dumps
- where a specific schema or table has been requested. Note that
- large objects are considered data and therefore will be included when
- <option>--data-only</option> is used, but not
- when <option>--schema-only</option> is.
+ except when <option>--schema</option>, <option>--table</option>,
+ <option>--schema-only</option>, <option>--statistics-only</option>, or
+ <option>--no-data</option> is specified. The <option>-b</option>
+ switch is therefore only useful to add large objects to dumps where a
+ specific schema or table has been requested. Note that large objects
+ are considered data and therefore will be included when
+ <option>--data-only</option> is used, but not when
+ <option>--schema-only</option> or <option>--statistics-only</option>
+ is.
</para>
</listitem>
</varlistentry>
@@ -516,10 +518,11 @@ PostgreSQL documentation
<term><option>--schema-only</option></term>
<listitem>
<para>
- Dump only the object definitions (schema), not data.
+ Dump only the object definitions (schema), not data or statistics.
</para>
<para>
- This option is the inverse of <option>--data-only</option>.
+ This option is mutually exclusive to <option>--data-only</option>
+ and <option>--statistics-only</option>.
It is similar to, but for historical reasons not identical to,
specifying
<option>--section=pre-data --section=post-data</option>.
@@ -653,6 +656,17 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--statistics-only</option></term>
+ <listitem>
+ <para>
+ Dump only the statistics, not the schema (data definitions) or data.
+ Statistics for tables, materialized views, and indexes are dumped.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-Z <replaceable class="parameter">level</replaceable></option></term>
<term><option>-Z <replaceable class="parameter">method</replaceable></option>[:<replaceable>detail</replaceable>]</term>
<term><option>--compress=<replaceable class="parameter">level</replaceable></option></term>
@@ -741,7 +755,8 @@ PostgreSQL documentation
<term><option>--disable-triggers</option></term>
<listitem>
<para>
- This option is relevant only when creating a data-only dump.
+ This option is relevant only when creating a dump that includes data
+ but does not include schema.
It instructs <application>pg_dump</application> to include commands
to temporarily disable triggers on the target tables while
the data is restored. Use this if you have referential
@@ -833,7 +848,8 @@ PostgreSQL documentation
though you do not need the data in it.
</para>
<para>
- To exclude data for all tables in the database, see <option>--schema-only</option>.
+ To exclude data for all tables in the database, see <option>--schema-only</option>
+ or <option>--statistics-only</option>.
</para>
</listitem>
</varlistentry>
@@ -1081,6 +1097,15 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--no-data</option></term>
+ <listitem>
+ <para>
+ Do not dump data.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--no-publications</option></term>
<listitem>
<para>
@@ -1099,6 +1124,24 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--no-schema</option></term>
+ <listitem>
+ <para>
+ Do not dump schema (data definitions).
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--no-statistics</option></term>
+ <listitem>
+ <para>
+ Do not dump statistics.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--no-subscriptions</option></term>
<listitem>
<para>
@@ -1236,9 +1279,11 @@ PostgreSQL documentation
</para>
<para>
The data section contains actual table data, large-object
- contents, and sequence values.
+ contents, statitistics for tables and materialized views and
+ sequence values.
Post-data items include definitions of indexes, triggers, rules,
- and constraints other than validated check constraints.
+ statistics for indexes, and constraints other than validated check
+ constraints.
Pre-data items include all other data definition items.
</para>
</listitem>
@@ -1581,7 +1626,7 @@ CREATE DATABASE foo WITH TEMPLATE template0;
</para>
<para>
- When a data-only dump is chosen and the option <option>--disable-triggers</option>
+ When a dump without schema is chosen and the option <option>--disable-triggers</option>
is used, <application>pg_dump</application> emits commands
to disable triggers on user tables before inserting the data,
and then commands to re-enable them after the data has been
diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml
index 39d93c2c0e3..f0823765c4e 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -81,7 +81,7 @@ PostgreSQL documentation
<term><option>--data-only</option></term>
<listitem>
<para>
- Dump only the data, not the schema (data definitions).
+ Dump only the data, not the schema (data definitions) or statistics.
</para>
</listitem>
</varlistentry>
@@ -266,6 +266,16 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
</varlistentry>
<varlistentry>
+ <term><option>--statistics-only</option></term>
+ <listitem>
+ <para>
+ Dump only the statistics, not the schema (data definitions) or data.
+ Statistics for tables, materialized views, and indexes are dumped.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--binary-upgrade</option></term>
<listitem>
<para>
@@ -307,7 +317,7 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
<term><option>--disable-triggers</option></term>
<listitem>
<para>
- This option is relevant only when creating a data-only dump.
+ This option is relevant only when creating a dump with data and without schema.
It instructs <application>pg_dumpall</application> to include commands
to temporarily disable triggers on the target tables while
the data is restored. Use this if you have referential
@@ -423,6 +433,15 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
</varlistentry>
<varlistentry>
+ <term><option>--no-data</option></term>
+ <listitem>
+ <para>
+ Do not dump data.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--no-publications</option></term>
<listitem>
<para>
@@ -448,6 +467,15 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
</varlistentry>
<varlistentry>
+ <term><option>--no-schema</option></term>
+ <listitem>
+ <para>
+ Do not dump schema (data definitions).
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--no-security-labels</option></term>
<listitem>
<para>
@@ -457,6 +485,15 @@ exclude database <replaceable class="parameter">PATTERN</replaceable>
</varlistentry>
<varlistentry>
+ <term><option>--no-statistics</option></term>
+ <listitem>
+ <para>
+ Do not dump statistics.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--no-subscriptions</option></term>
<listitem>
<para>
diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml
index b8b27e1719e..b4031708430 100644
--- a/doc/src/sgml/ref/pg_restore.sgml
+++ b/doc/src/sgml/ref/pg_restore.sgml
@@ -94,7 +94,7 @@ PostgreSQL documentation
<term><option>--data-only</option></term>
<listitem>
<para>
- Restore only the data, not the schema (data definitions).
+ Restore only the data, not the schema (data definitions) or statistics.
Table data, large objects, and sequence values are restored,
if present in the archive.
</para>
@@ -483,10 +483,11 @@ PostgreSQL documentation
to the extent that schema entries are present in the archive.
</para>
<para>
- This option is the inverse of <option>--data-only</option>.
+ This option is mutually exclusive of <option>--data-only</option>
+ and <option>--statistics-only</option>.
It is similar to, but for historical reasons not identical to,
specifying
- <option>--section=pre-data --section=post-data</option>.
+ <option>--section=pre-data --section=post-data --no-statistics</option>.
</para>
<para>
(Do not confuse this with the <option>--schema</option> option, which
@@ -600,6 +601,15 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--statistics-only</option></term>
+ <listitem>
+ <para>
+ Restore only the statistics, not schema (data definitions) or data.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-1</option></term>
<term><option>--single-transaction</option></term>
<listitem>
@@ -617,7 +627,7 @@ PostgreSQL documentation
<term><option>--disable-triggers</option></term>
<listitem>
<para>
- This option is relevant only when performing a data-only restore.
+ This option is relevant only when performing a restore without schema.
It instructs <application>pg_restore</application> to execute commands
to temporarily disable triggers on the target tables while
the data is restored. Use this if you have referential
@@ -682,6 +692,16 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--no-data</option></term>
+ <listitem>
+ <para>
+ Do not output commands to restore data, even if the archive
+ contains them.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--no-data-for-failed-tables</option></term>
<listitem>
<para>
@@ -714,6 +734,16 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--no-schema</option></term>
+ <listitem>
+ <para>
+ Do not output commands to restore schema (data definitions), even if
+ the archive contains them.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--no-security-labels</option></term>
<listitem>
<para>
@@ -724,6 +754,16 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--no-statistics</option></term>
+ <listitem>
+ <para>
+ Do not output commands to restore statistics, even if the archive
+ contains them.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--no-subscriptions</option></term>
<listitem>
<para>
diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index 4777381dac2..4d9ca2a5616 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -146,6 +146,15 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
+ <term><option>--no-statistics</option></term>
+ <listitem>
+ <para>
+ Do not restore statistics from the old cluster into the new cluster.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-o</option> <replaceable class="parameter">options</replaceable></term>
<term><option>--old-options</option> <replaceable class="parameter">options</replaceable></term>
<listitem><para>options to be passed directly to the