From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor tar method of walmethods.c to rely on the compression m
Date: Fri, 07 Jan 2022 04:49:48 +0000
Message-ID: <E1n5hCG-0006ld-90@gemulon.postgresql.org> (raw)
Refactor tar method of walmethods.c to rely on the compression method
Since d62bcc8, the directory method of walmethods.c uses the compression
method to determine which code path to take. The tar method, used by
pg_basebackup --format=t, was inconsistent regarding that, as it relied
on the compression level to check if no compression or gzip should be
used. This commit makes the code more consistent as a whole in this
file, making the tar logic use a compression method rather than
assigning COMPRESSION_NONE that would be ignored.
The options of pg_basebackup are planned to be reworked but we are not
sure yet of the shape they should have as this has some dependency with
the integration of the server-side compression for base backups, so this
is left out for the moment. This change has as benefit to make easier
the future integration of new compression methods for the tar method of
walmethods.c, for the client-side compression.
Reviewed-by: Georgios Kokolatos
Discussion: https://postgr.es/m/Yb3GEgWwcu4wZDuA@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/000f3adfdc4336df83777eba86ce48f36cb6c6e9
Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 3 +-
src/bin/pg_basebackup/walmethods.c | 57 ++++++++++++++++++++++-------------
2 files changed, 38 insertions(+), 22 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: Refactor tar method of walmethods.c to rely on the compression m
In-Reply-To: <E1n5hCG-0006ld-90@gemulon.postgresql.org>
References: <E1n5hCG-0006ld-90@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