Re: refactoring basebackup.c - Mailing list pgsql-hackers

From Jeevan Ladhe
Subject Re: refactoring basebackup.c
Date
Msg-id CANm22CihmbpW8pn6W=9OuPatuFP3Wmi6BHTUk8COdgUxOh=qDA@mail.gmail.com
Whole thread Raw
In response to Re: refactoring basebackup.c  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: refactoring basebackup.c  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi Everyone,

So, I went ahead and have now also implemented client side decompression
for zstd.

Robert separated[1] the ZSTD configure switch from my original patch
of server side compression and also added documentation related to
the switch. I have included that patch here in the patch series for
simplicity.

The server side compression patch
0002-ZSTD-add-server-side-compression-support.patch has also taken care
of Justin Pryzby's comments[2]. Also, made changes to pg_basebackup help
as suggested by Álvaro Herrera.

[1] https://www.postgresql.org/message-id/CA%2BTgmobRisF-9ocqYDcMng6iSijGj1EZX99PgXA%3D3VVbWuahog%40mail.gmail.com
[2] https://www.postgresql.org/message-id/20220215175944.GY31460%40telsasoft.com

Regards,
Jeevan Ladhe

On Wed, 16 Feb 2022 at 21:46, Robert Haas <robertmhaas@gmail.com> wrote:
On Wed, Feb 16, 2022 at 11:11 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> This is hard to interpret for humans though because of the nested
> brackets and braces.  It gets considerably easier if you split it in
> separate variants:
>
>    -Z, --compress=[{client|server}-]{gzip|lz4}[:LEVEL]
>    -Z, --compress=LEVEL
>    -Z, --compress=none
>                          compress tar output with given compression method or level
>
>
> or, if you choose to leave the level-only variant undocumented, then
>
>    -Z, --compress=[{client|server}-]{gzip|lz4}[:LEVEL]
>    -Z, --compress=none
>                          compress tar output with given compression method or level
>
> There still are some nested brackets and braces, but the scope is
> reduced enough that interpreting seems quite a bit simpler.

I could go for that. I'm also just noticing that "none" is not really
a compression method or level, and the statement that it can only
compress "tar" output is no longer correct, because server-side
compression can be used together with -Fp. So maybe we should change
the sentence afterward to something a bit more generic, like "specify
whether and how to compress the backup".

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

pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: USE_BARRIER_SMGRRELEASE on Linux?
Next
From: Peter Geoghegan
Date:
Subject: Re: do only critical work during single-user vacuum?