Re: Add LZ4 compression in pg_dump

From: gkokolatos(at)pm(dot)me
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, shiy(dot)fnst(at)fujitsu(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org, Rachel Heaton <rachelmheaton(at)gmail(dot)com>
Subject: Re: Add LZ4 compression in pg_dump
Date: 2023-04-26 08:50:46
Message-ID: zQ_IWLN4NaKCvn4Oa14kloWwjAvzzMONghHLpaVLN2U_4HWAUiHSOh0qlH_Dv2B_dmBECYrbAb3_p8rX7SEdSNUhSKNqF-RmVfSZZS1b2go=@pm.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

------- Original Message -------
On Tuesday, April 25th, 2023 at 8:02 AM, Michael Paquier <michael(at)paquier(dot)xyz> wrote:

>
>
> On Wed, Apr 12, 2023 at 07:53:53PM -0500, Justin Pryzby wrote:
>
> > I doubt it - in the !HAVE_LIBZ case, it's currently an "if" statement
> > with nothing but a comment, which isn't a problem.
> >
> > I think the only issue with an empty "if" is when you have no braces,
> > like:
> >
> > if (...)
> > #if ...
> > something;
> > #endif
> >
> > // problem here //
>
>
> (My apologies for the late reply.)
>
> Still it could be easily messed up, and that's not a style that
> really exists in the tree, either, because there are always #else
> blocks set up in such cases. Another part that makes me a bit
> uncomfortable is that we would still call twice
> parse_compress_specification(), something that should not happen but
> we are doing so on HEAD because the default compression_algorithm_str
> is "none" and we want to enforce "gzip" for custom and directory
> formats when building with zlib.
>
> What about just moving this block a bit up, just before the
> compression spec parsing, then? If we set compression_algorithm_str,
> the specification is compiled with the expected default, once instead
> of twice.

For what is worth, I think this would be the best approach. +1

Cheers,
//Georgios

> --
> Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-04-26 08:56:50 Re: Support logical replication of DDLs
Previous Message Daniel Gustafsson 2023-04-26 08:48:16 Re: [pg_rewind] use the passing callback instead of global function