Re: Non-text mode for pg_dumpall

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>
Cc: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Srinath Reddy <srinath2133(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Non-text mode for pg_dumpall
Date: 2025-02-24 09:17:45
Message-ID: CACJufxGMwPYdnxpci4R-JDKdxPJvRGGq8wr16TAKOJiAuhp9Vw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi.
some documentation issue:

doc/src/sgml/ref/pg_dumpall.sgml
<variablelist>
<varlistentry>
<term><literal>d</literal></term>
<term><literal>directory</literal></term>
<listitem>
<para>
Output a directory-format archive suitable for input into
pg_restore. Under dboid
subdirectory, this will create a directory with one file
for each table and large
object being dumped, plus a so-called Table of Contents
file describing the dumped
objects in a machine-readable format that pg_restore can
read. A directory format
archive can be manipulated with standard Unix tools; for
example, files in an
uncompressed archive can be compressed with the gzip, lz4,
or zstd tools. This
format is compressed by default using gzip and also
supports parallel dumps.
</para>
</listitem>
</varlistentry>
with the v20 implementation,
"""
For example, files in an
uncompressed archive can be compressed with the gzip, lz4,
or zstd tools. This
format is compressed by default using gzip and also
supports parallel dumps.
""
Is this part is wrong?
I think, currently, by default the pg_dumpall directory will use gzip
compress level=-1 to do the compression.
and pg_dumpall format==directory does not support parallel dumps.

-------------------
by default, this is plain format. If non-plain mode is passed, then global.dat
(global sql commands) and map.dat(dboid and dbnames list of all the databases)
files will be created. Apart from these files, one subdirectory with databases
name will be created. Under this databases subdirectory, there will be files
with dboid name for each database and if --format is directory, then toc.dat and
other dump files will be under dboid subdirectory.
-------------------
I think the above message changes to the below, the message is more clear, IMHO.

By default, this uses plain format. If a non-plain mode is specified, two files
will be created: **global.dat** (containing SQL commands for global objects) and
**map.dat** (listing database OIDs and names for all databases). Additionally, a
subdirectory named after each database OID will be created.
If the --format option is set to **directory**, then **toc.dat** and
other dump files
will be stored within the corresponding database Oid subdirectory.

---------------------
doc/src/sgml/ref/pg_restore.sgml
<term><option>--exclude-database=<replaceable
class="parameter">pattern</replaceable></option></term>
we can add:

When emitting a script, this option is not supported for
wild-card matching,
the excluded database must exactly match the literal
<replaceable class="parameter">pattern</replaceable> string.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2025-02-24 09:20:51 Re: Virtual generated columns
Previous Message wenhui qiu 2025-02-24 09:12:40 Re: Anti join confusion