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

From Robert Haas
Subject Re: refactoring basebackup.c
Date
Msg-id CA+Tgmoa+TSF2a=Bi8dnU-uzq2J6ebkBSUXDJ3MFiBHpn1Jrq3A@mail.gmail.com
Whole thread Raw
In response to Re: refactoring basebackup.c  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: refactoring basebackup.c  (Jeevan Ladhe <jeevanladhe.os@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

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