From e7b809ae758636833e1e8a248ac6a6834eb034a1 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 29 Mar 2026 13:53:17 -0400 Subject: [PATCH] Doc: clarify introductory description of pg_dumpall. Add a sentence that describes the parts of a cluster's state that are *not* included in the output. Also swap two sentences in the introductory paragraph. Without that, it is not clear what the "it" at the beginning of the second sentence is referring to. Also add a reference to pg_restore, since not all output formats are restored with pg_dump. Also clarify the recently-added text about where different output formats go, and relocate it above the ancillary text about having to run as superuser. Reported-by: Dimitre Radoulov Author: Laurenz Albe Reviewed-by: Tom Lane Discussion: https://postgr.es/m/CAGJBphSX2oMPPu=VM4U8NP4+qffFH_483tFQCJ_s-mOcN3DLDw@mail.gmail.com --- doc/src/sgml/ref/pg_dumpall.sgml | 36 +++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml index 49e5c99b09e..51c70198091 100644 --- a/doc/src/sgml/ref/pg_dumpall.sgml +++ b/doc/src/sgml/ref/pg_dumpall.sgml @@ -36,14 +36,33 @@ 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. The output contains - SQL commands that can be used as input to to restore the databases. It does this by + of a cluster into an SQL script file or an archive. 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. @@ -54,17 +73,6 @@ PostgreSQL documentation allowed to add roles and create databases. - - Plain text SQL scripts will be written to the standard output. Use the - / option or shell operators to - redirect it into a file. - - - - Archives in other formats will be placed in a directory named using the - /, which is required in this case. - - pg_dumpall needs to connect several times to the PostgreSQL server (once per