From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Extend the options of pg_basebackup to control compression
Date: Fri, 21 Jan 2022 02:09:13 +0000
Message-ID: <E1nAjMX-00016j-1I@gemulon.postgresql.org> (raw)
Extend the options of pg_basebackup to control compression
The option --compress is extended to accept a compression method and an
optional compression level, as of the grammar METHOD[:LEVEL]. The
methods currently support are "none" and "gzip", for client-side
compression. Any of those methods use only an integer value for the
compression level, but any method implemented in the future could use
more specific keywords if necessary.
This commit keeps the logic backward-compatible. Hence, the following
compatibility rules apply for the new format of the option --compress:
* -z/--gzip is a synonym of --compress=gzip.
* --compress=NUM implies:
** --compress=none if NUM = 0.
** --compress=gzip:NUM if NUM > 0.
Note that there are also plans to extend more this grammar with
server-side compression.
Reviewed-by: Robert Haas, Magnus Hagander, Álvaro Herrera, David
G. Johnston, Georgios Kokolatos
Discussion: https://postgr.es/m/Yb3GEgWwcu4wZDuA@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5c649fe153367cdab278738ee4aebbfd158e0546
Modified Files
--------------
doc/src/sgml/ref/pg_basebackup.sgml | 21 +++-
src/bin/pg_basebackup/pg_basebackup.c | 146 +++++++++++++++++++++++----
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 36 ++++++-
3 files changed, 179 insertions(+), 24 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Extend the options of pg_basebackup to control compression
In-Reply-To: <E1nAjMX-00016j-1I@gemulon.postgresql.org>
References: <E1nAjMX-00016j-1I@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox