Re: Teach pg_receivewal to use lz4 compression

gkokolatos@pm.me

From: gkokolatos@pm.me
To: Jian Guo <gjian@vmware.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-09-13T08:35:43Z
Lists: pgsql-hackers

Attachments

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

On Saturday, September 11th, 2021 at 07:02, Jian Guo <gjian@vmware.com> wrote:

Hi,

thank you for looking at the patch.

> -         	LZ4F_decompressionContext_t ctx = NULL;
> -         	snprintf(fullpath, sizeof(fullpath), "%s/%s", basedir, dirent->d_name);
> -         	fd = open(fullpath, O_RDONLY | PG_BINARY, 0);
>
> Should close the fd before exit or abort.

You are correct. Please find version 4 attached.

Cheers,
//Georgios

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