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>, 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-01-26 18:03:59
Message-ID: AcPUJxzDanXfXdqYOrrZ0L9J9qcnCblkc5z5x9IgKUm7d89pa6B7y8fhUOb2JGDef8h3VP6Ts7j-BYSMmtn50jVuHAT2nBleGosIdVyhG7Q=@pm.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

------- Original Message -------
On Thursday, January 26th, 2023 at 12:53 PM, Michael Paquier <michael(at)paquier(dot)xyz> wrote:

>
>
> On Thu, Jan 26, 2023 at 11:24:47AM +0000, gkokolatos(at)pm(dot)me wrote:
>
> > I gave this a little bit of thought. I think that ReadHead should not
> > emit a warning, or at least not this warning as it is slightly misleading.
> > It implies that it will automatically turn off data restoration, which is
> > false. Further ahead, the code will fail with a conflicting error message
> > stating that the compression is not available.
> >
> > Instead, it would be cleaner both for the user and the maintainer to
> > move the check in RestoreArchive and make it the sole responsible for
> > this logic.
>
>
> - pg_fatal("cannot restore from compressed archive (compression not supported in this installation)");
> + pg_fatal("cannot restore data from compressed archive (compression not supported in this installation)");
> Hmm. I don't mind changing this part as you suggest.
>
> -#ifndef HAVE_LIBZ
> - if (AH->compression_spec.algorithm == PG_COMPRESSION_GZIP)
>
> - pg_fatal("archive is compressed, but this installation does not support compression");
> -#endif
> However I think that we'd better keep the warning, as it can offer a
> hint when using pg_restore -l not built with compression support if
> looking at a dump that has been compressed.

Fair enough. Please find v27 attached.

Cheers,
//Georgios

> --
> Michael

Attachment Content-Type Size
v27-0001-Address-regression-in-pg_dump-s-ReadHead.patch text/x-patch 2.2 KB
v27-0004-Add-LZ4-compression-to-pg_dump.patch text/x-patch 29.7 KB
v27-0002-Prepare-pg_dump-internals-for-additional-compres.patch text/x-patch 14.3 KB
v27-0003-Introduce-Compress-and-Compressor-API-in-pg_dump.patch text/x-patch 68.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-01-26 18:05:04 Re: meson oddities
Previous Message Nathan Bossart 2023-01-26 18:01:16 Re: fix and document CLUSTER privileges