Re: Teach pg_receivewal to use lz4 compression

gkokolatos@pm.me

From: gkokolatos@pm.me
To: Michael Paquier <michael@paquier.xyz>
Cc: Magnus Hagander <magnus@hagander.net>, Dilip Kumar <dilipbalaut@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-11-01T08:39:59Z
Lists: pgsql-hackers

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

On Monday, November 1st, 2021 at 9:09 AM, Michael Paquier <michael@paquier.xyz> wrote:

> On Fri, Oct 29, 2021 at 08:38:33PM +0900, Michael Paquier wrote:
>
> It would be good to test with many segments, but could we think about
> just relying on LZ4F_decompress() with a frame and compute the
> decompressed size by ourselves? At least that will never break, and
> that would work in all the cases aimed by pg_receivewal.

Agreed.

I have already started on v8 of the patch with that technique. I should
be able to update the thread soon.

>
> Michael



Commits

  1. Fix header inclusion order in pg_receivewal.c

  2. Remove useless LZ4 system call on failure when writing file header

  3. Add support for LZ4 compression in pg_receivewal

  4. Rework compression options of pg_receivewal

  5. Clarify some errors in pg_receivewal when closing WAL segments