Re: Teach pg_receivewal to use lz4 compression

From: Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>
To: gkokolatos(at)pm(dot)me
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Teach pg_receivewal to use lz4 compression
Date: 2021-11-18 14:24:37
Message-ID: CAOgcT0PE33wbD7giAT1OSkNJt=p-vu8huq++qh=ny9O=SCP5aA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In dir_open_for_write() I observe that we are writing the header
and then calling LZ4F_compressEnd() in case there is an error
while writing the buffer to the file, and the output buffer of
LZ4F_compressEnd() is not written anywhere. Why should this be
necessary? To flush the contents of the internal buffer? But, then we
are calling LZ4F_freeCompressionContext() immediately after the
LZ4F_compressEnd() call. I might be missing something, will be
happy to get more insights.

Regards,
Jeevan Ladhe

On Fri, Nov 5, 2021 at 1:21 PM <gkokolatos(at)pm(dot)me> wrote:

>
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>
> On Friday, November 5th, 2021 at 3:47 AM, Michael Paquier <
> michael(at)paquier(dot)xyz> wrote:
>
> >
> > I have spent an extra couple of hours staring at the code, and the
> > whole looked fine, so applied. While on it, I have tested the new TAP
> > tests with all the possible combinations of --without-zlib and
> > --with-lz4.
>
> Great news. Thank you very much.
>
> Cheers,
> //Georgios
>
> > --
> > Michael
>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message osumi.takamichi@fujitsu.com 2021-11-18 14:39:11 RE: Failed transaction statistics to measure the logical replication progress
Previous Message Robert Haas 2021-11-18 14:17:50 Re: Should rename "startup process" to something else?