Re: Teach pg_receivewal to use lz4 compression - Mailing list pgsql-hackers

From gkokolatos@pm.me
Subject Re: Teach pg_receivewal to use lz4 compression
Date
Msg-id A6gxTGqoplZLSOzN0MS2zsutUZdFFEMhWmcrcb9MLvJ3MJ_ylD4X-g0iqHW9cB6D-dTAgf4Ep1aQoZ9UuFf9k3DBI2gZoYmZk_BFBFX2_ow=@pm.me
Whole thread Raw
In response to Re: Teach pg_receivewal to use lz4 compression  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Teach pg_receivewal to use lz4 compression
List pgsql-hackers

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Thursday, July 1st, 2021 at 12:28, Magnus Hagander <magnus@hagander.net> wrote:

> On Wed, Jun 30, 2021 at 8:34 AM Dilip Kumar dilipbalaut@gmail.com wrote:
>
> > On Tue, Jun 29, 2021 at 8:15 PM gkokolatos@pm.me wrote:
> >
> > > Hi,
> > >
> > > The program pg_receivewal can use gzip compression to store the received WAL.
> > >
> > > This patch teaches it to be able to use lz4 compression if the binary is build
> > >
> > > using the -llz4 flag.
> >
> > +1 for the idea
> >
> > Some comments/suggestions on the patch
> >
> > @@ -90,7 +91,8 @@ usage(void)
> >
> > printf((" --synchronous flush write-ahead log immediately
> >
> > after writing\n"));
> >
> > printf((" -v, --verbose output verbose messages\n"));
> >
> > printf(_(" -V, --version output version information, then exit\n"));
> >
> > -   printf(_(" -Z, --compress=0-9 compress logs with given
> >
> >     compression level\n"));
> >
> > -   printf(_(" -I, --compress-program use this program for compression\n"));
> >
> > Wouldn't it be better to call it compression method instead of
> >
> > compression program?
>
> I came here to say exactly that, just had to think up what I thought
>
> was the better name first. Either method or algorithm, but method
>
> seems like the much simpler choice and therefore better in this case.
>
> Should is also then not be --compression-method, rather than --compress-method?

Not a problem. To be very transparent, I first looked what was already out there.
For example `tar` is using
    -I, --use-compress-program=PROG
yet the 'use-' bit would push the alignment of the --help output, so I removed it.

To me, as a non native English speaker, `--compression-method` does sound better.
I can just re-align the rest of the help output.

Updated patch is on the making.

>
>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Magnus Hagander
>
> Me: https://www.hagander.net/
>
> Work: https://www.redpill-linpro.com/



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Added schema level support for publication.
Next
From: Magnus Hagander
Date:
Subject: Re: Teach pg_receivewal to use lz4 compression