Re: Refactoring of compression options in pg_basebackup

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Georgios Kokolatos <gkokolatos@pm.me>, Postgres hackers <pgsql-hackers@lists.postgresql.org>, Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Date: 2022-01-17T14:14:05Z
Lists: pgsql-hackers
On Fri, Jan 14, 2022 at 9:54 PM Michael Paquier <michael@paquier.xyz> wrote:
> Okay.  So, based on this feedback, I guess that something like the
> attached would be what we are looking for.  I have maximized the
> amount of code removed with the removal of -z/-Z,  but I won't fight
> hard if the consensus is to keep them, either.  We could also keep
> -z/--gzip, and stick -Z to the new --compression-level with
> --compress removed.

I mean, I really don't understand the benefit of removing -z and -Z.
-z can remain a synonym for --client-compress=gzip and -Z for
--client-compress=gzip --compression-level=$N and nobody will be
harmed. Taking them out reduces backward compatibility for no gain
that I can see.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



Commits

  1. Extend the options of pg_basebackup to control compression

  2. Add TAP tests for pg_basebackup with compression

  3. Refactor tar method of walmethods.c to rely on the compression method