diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml
index 51c70198091..8834b7ec141 100644
--- a/doc/src/sgml/ref/pg_dumpall.sgml
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -16,10 +16,7 @@ PostgreSQL documentation
pg_dumpall
-
-
- export a PostgreSQL database cluster as an SQL script or to other formats
-
+ extract a PostgreSQL database cluster into a script file
@@ -36,33 +33,14 @@ PostgreSQL documentation
pg_dumpall is a utility for writing out
(dumping) all PostgreSQL databases
- of a cluster into an SQL script file or an archive. It does this by
+ of a cluster into one script file. The script file contains
+ SQL commands that can be used as input to to restore the databases. It does this by
calling for each database in the cluster.
- The output contains SQL commands that can be used
- as input to or
- to restore the databases.
pg_dumpall also dumps global objects
that are common to all databases, namely database roles, tablespaces,
and privilege grants for configuration parameters.
(pg_dump does not save these objects.)
- The only parts of a database cluster's state that
- are not included in the default output
- of pg_dumpall are the configuration files
- and any database parameter setting changes made with
- .
-
-
-
- If the output format is a
- plain text SQL script, it will be written to the standard output. Use the
- / option or shell operators to
- redirect it into a file.
-
-
-
- If another output format is selected, the archive will be placed in a
- directory named using the /
- option, which is required in this case.
@@ -73,6 +51,12 @@ PostgreSQL documentation
allowed to add roles and create databases.
+
+ The SQL script will be written to the standard output. Use the
+ / option or shell operators to
+ redirect it into a file.
+
+
pg_dumpall needs to connect several
times to the PostgreSQL server (once per
@@ -147,93 +131,16 @@ PostgreSQL documentation
Send output to the specified file. If this is omitted, the
standard output is used.
- This option can only be omitted when is plain.
-
-
-
-
-
- Specify the format of dump files. In plain format, all the dump data is
- sent in a single text stream. This is the default.
-
- In all other modes, pg_dumpall first creates two files,
- toc.glo and map.dat, in the directory
- specified by .
- The first file contains global data (roles and tablespaces) in custom format. The second
- contains a mapping between database OIDs and names. These files are used by
- pg_restore. Data for individual databases is placed in
- the databases subdirectory, named using the database's OID.
-
-
-
- d
- directory
-
-
- Output directory-format archives for each database,
- suitable for input into pg_restore. The directory
- will have database oid as its name.
-
-
-
-
-
- p
- plain
-
-
- Output a plain-text SQL script file (the default).
-
-
-
-
-
- c
- custom
-
-
- Output a custom-format archive for each database,
- suitable for input into pg_restore. The archive
- will be named dboid.dmp where dboid is the
- oid of the database.
-
-
-
-
-
- t
- tar
-
-
- Output a tar-format archive for each database,
- suitable for input into pg_restore. The archive
- will be named dboid.tar where dboid is the
- oid of the database.
-
-
-
-
-
-
- See for details on how the
- various non-plain-text archive formats work.
-
-
-
-
-
Dump only global objects (roles and tablespaces), no databases.
- Note: cannot be used with
- with non-text dump format.
@@ -1029,21 +936,13 @@ exclude database PATTERNExamples
- To dump all databases in plain text format (the default):
+ To dump all databases:
+
$pg_dumpall > db.out
-
- To dump all databases using other formats:
-
-$pg_dumpall --format=directory -f db.out
-$pg_dumpall --format=custom -f db.out
-$pg_dumpall --format=tar -f db.out
-
-
-
To restore database(s) from this file, you can use:
@@ -1057,16 +956,6 @@ exclude database PATTERN
the script will attempt to drop other databases immediately, and that
will fail for the database you are connected to.
-
-
- If the dump was taken in a non-plain-text format, use
- pg_restore to restore the databases:
-
-$pg_restore db.out -d postgres -C
-
- This will restore all databases. To restore only some databases, use
- the option to skip those not wanted.
-
diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgml
index 5e77ddd556f..b6c5299c36e 100644
--- a/doc/src/sgml/ref/pg_restore.sgml
+++ b/doc/src/sgml/ref/pg_restore.sgml
@@ -18,9 +18,8 @@ PostgreSQL documentation
pg_restore
- restore PostgreSQL databases from archives
- created by pg_dump or
- pg_dumpall
+ restore a PostgreSQL database from an
+ archive file created by pg_dump
@@ -39,14 +38,13 @@ PostgreSQL documentation
pg_restore is a utility for restoring a
- PostgreSQL database or cluster from an archive
- created by or
- in one of the non-plain-text
+ PostgreSQL database from an archive
+ created by in one of the non-plain-text
formats. It will issue the commands necessary to reconstruct the
- database or cluster to the state it was in at the time it was saved. The
- archives also allow pg_restore to
+ database to the state it was in at the time it was saved. The
+ archive files also allow pg_restore to
be selective about what is restored, or even to reorder the items
- prior to being restored. The archive formats are designed to be
+ prior to being restored. The archive files are designed to be
portable across architectures.
@@ -54,34 +52,14 @@ PostgreSQL documentation
pg_restore can operate in two modes.
If a database name is specified, pg_restore
connects to that database and restores archive contents directly into
- the database.
- When restoring from a dump made by pg_dumpall,
- each database will be created and then the restoration will be run in that
- database.
-
- Otherwise, when a database name is not specified, a script containing the SQL
- commands necessary to rebuild the database or cluster is created and written
+ the database. Otherwise, a script containing the SQL
+ commands necessary to rebuild the database is created and written
to a file or standard output. This script output is equivalent to
- the plain text output format of pg_dump or
- pg_dumpall.
-
+ the plain text output format of pg_dump.
Some of the options controlling the output are therefore analogous to
pg_dump options.
-
- A non-plain-text archive made using pg_dumpall
- is a directory containing a toc.glo file with global
- objects (roles and tablespaces), a map.dat file
- listing the databases, and a subdirectory for each database containing
- its archive. When restoring such an archive,
- pg_restore first restores global objects from
- toc.glo, then processes each database listed in
- map.dat. Lines in map.dat can
- be commented out with # to skip restoring specific
- databases.
-
-
Obviously, pg_restore cannot restore information
that is not present in the archive file. For instance, if the
@@ -152,12 +130,6 @@ PostgreSQL documentation
ignorable error messages will be reported,
unless is also specified.
-
- When restoring a pg_dumpall archive,
- is implied by ,
- since global objects such as roles and tablespaces may not exist
- in the target cluster.
-
@@ -180,8 +152,6 @@ PostgreSQL documentation
commands that mention this database.
Access privileges for the database itself are also restored,
unless is specified.
- is required when restoring multiple databases
- from a non-plain-text archive made using pg_dumpall.
@@ -282,29 +252,6 @@ PostgreSQL documentation
-
-
-
-
-
- Restore only global objects (roles and tablespaces), no databases.
-
-
- This option is only relevant when restoring from a non-plain-text archive made using pg_dumpall.
- Note: cannot be used with
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- , or
- .
-
-
-
-
@@ -641,28 +588,6 @@ PostgreSQL documentation
-
-
-
-
- Do not restore databases whose name matches
- pattern.
- Multiple patterns can be excluded by writing multiple
- switches. The
- pattern parameter is
- interpreted as a pattern according to the same rules used by
- psql's \d
- commands (see ),
- so multiple databases can also be excluded by writing wildcard
- characters in the pattern. When using wildcards, be careful to
- quote the pattern if needed to prevent shell wildcard expansion.
-
-
- This option is only relevant when restoring from a non-plain-text archive made using pg_dumpall.
-
-
-
-
@@ -751,9 +676,7 @@ PostgreSQL documentation
in mode. This suppresses does not
exist errors that might otherwise be reported. This
option is not valid unless is also
- specified. This option is implied when restoring a
- pg_dumpall archive with
- .
+ specified.
@@ -800,21 +723,6 @@ PostgreSQL documentation
-
-
-
-
- Do not restore global objects (roles and tablespaces). When
- / is not specified,
- databases that do not already exist on the target server are skipped.
-
-
- This option is only relevant when restoring from a non-plain-text
- archive made using pg_dumpall.
-
-
-
-
@@ -1240,21 +1148,6 @@ CREATE DATABASE foo WITH TEMPLATE template0;
-
-
- The following options cannot be used when restoring from a non-plain-text
- archive made using pg_dumpall:
- ,
- ,
- ,
- ,
- , and
- .
- Also, if the option is used, it must
- include .
-
-
-
diff --git a/doc/src/sgml/release-19.sgml b/doc/src/sgml/release-19.sgml
index 35adc534a7b..7c73cba11b7 100644
--- a/doc/src/sgml/release-19.sgml
+++ b/doc/src/sgml/release-19.sgml
@@ -2688,25 +2688,6 @@ Report nanoseconds instead of microseconds. In addition to histogram output, ou
linkend="app-pgrestore">pg_restore
-
-
-
-
-Allow pg_dumpall to produce output in non-text formats (Mahendra Singh Thalor, Andrew Dunstan)
-§
-§
-
-
-
-The new output formats are custom, directory, or tar.
-
-
-