Re: Add LZ4 compression in pg_dump

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: gkokolatos(at)pm(dot)me, Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, 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-03-01 16:14:08
Message-ID: 8788b1be-a59b-3b10-dc67-7a94cca16bb0@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/27/23 15:56, gkokolatos(at)pm(dot)me wrote:
>
>
>
>
>
> ------- Original Message -------
> On Saturday, February 25th, 2023 at 3:05 PM, Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
>
>
>>
>>
>> On Fri, Feb 24, 2023 at 11:02:14PM -0600, Justin Pryzby wrote:
>>
>>> I have some fixes (attached) and questions while polishing the patch for
>>> zstd compression. The fixes are small and could be integrated with the
>>> patch for zstd, but could be applied independently.
>
>
> Please find some comments on the rest of the fixes patch that Tomas has not
> commented on.
>
> can be compressed with the <application>gzip</application> or
> - <application>lz4</application>tool.
> + <application>lz4</application> tools.
>
> +1
>
> The compression method can be set to <literal>gzip</literal> or
> - <literal>lz4</literal> or <literal>none</literal> for no compression.
> + <literal>lz4</literal>, or <literal>none</literal> for no compression.
>
> I am not a native English speaker. Yet I think that if one adds commas
> in one of the options, then one should add commas to all the options.
> Namely, the aboveis missing a comma between gzip and lz4. However I
> think that not having any commas still works grammatically and
> syntactically.
>

I pushed a fix with most of these wording changes. As for this comma, I
believe the correct style is

a, b, or c

At least that's what the other places in the pg_dump.sgml file do.

> - ($pgdump_runs{$run}->{compile_option} eq 'gzip' && !$supports_gzip) ||
> - ($pgdump_runs{$run}->{compile_option} eq 'lz4' && !$supports_lz4))
> + (($pgdump_runs{$run}->{compile_option} eq 'gzip' && !$supports_gzip) ||
> + ($pgdump_runs{$run}->{compile_option} eq 'lz4' && !$supports_lz4)))
>

Pushed a fix for this too.

regards

--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2023-03-01 16:20:05 Re: Add LZ4 compression in pg_dump
Previous Message Kirk Wolak 2023-03-01 16:13:46 Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)