Re: Add LZ4 compression in pg_dump

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, gkokolatos(at)pm(dot)me, Andrew Dunstan <andrew(at)dunslane(dot)net>, Alexander Lakhin <exclusion(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(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-05-08 22:10:55
Message-ID: ZFlzb5KTJs9m0Fsn@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 08, 2023 at 08:00:39PM +0200, Tomas Vondra wrote:
> The LZ4Stream_write() forgot to move the pointer to the next chunk, so
> it was happily decompressing the initial chunk over and over. A bit
> embarrassing oversight :-(
>
> The custom format calls WriteDataToArchiveLZ4(), which was correct.
>
> The attached patch fixes this for me.

Ouch. So this was corrupting the dumps and the compression when
trying to write more than two chunks at once, not the decompression
steps. That addresses the issue here as well, thanks!
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2023-05-08 22:15:46 Re: PGDOCS - Replica Identity quotes
Previous Message Jeff Davis 2023-05-08 21:59:41 Re: Order changes in PG16 since ICU introduction