Re: Refactoring of compression options in pg_basebackup

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Georgios Kokolatos <gkokolatos(at)pm(dot)me>
Subject: Re: Refactoring of compression options in pg_basebackup
Date: 2021-12-20 15:19:44
Message-ID: CA+TgmoY+Fic4OXdQJie1rhtOpYbJsA+OMAdhNUiwJCjQB0Ashg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 18, 2021 at 6:29 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> This is one step toward the introduction of LZ4 in pg_basebackup, but
> this refactoring is worth doing on its own, hence a separate thread to
> deal with this problem first. The options of pg_basebackup are
> reworked to be consistent with pg_receivewal, as follows:
> - --compress ranges now from 1 to 9, instead of 0 to 9.
> - --compression-method={none,gzip} is added, the default is none, same
> as HEAD.
> - --gzip/-z has the same meaning as before, being just a synonym of
> --compression-method=gzip with the default compression level of ZLIB
> assigned if there is no --compress.

One thing we should keep in mind is that I'm also working on adding
server-side compression, initially with gzip, but Jeevan Ladhe has
posted patches to extend that to LZ4. So however we structure the
options they should take that into account. Currently that patch set
adds --server-compression={none,gzip,gzipN} where N from 1 to 9, but
perhaps it should be done differently. Not sure.

> One more thing that I have noticed while hacking this stuff is that we
> have no regression tests for gzip with pg_basebackup, so I have added
> some that are skipped when not compiling the code with ZLIB.

If they don't decompress the backup and run pg_verifybackup on it then
I'm not sure how much they help. Yet, I don't know how to do that
portably.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-12-20 15:20:12 Re: psql format output
Previous Message Robert Haas 2021-12-20 15:09:35 Re: Add id's to various elements in protocol.sgml