Re: basebackup/lz4 crash - Mailing list pgsql-hackers

From Dipesh Pandit
Subject Re: basebackup/lz4 crash
Date
Msg-id CAN1g5_EDaT69G87CcrK=Grhd_ON2pKnZ0v93OOEkqNHu7UO83Q@mail.gmail.com
Whole thread Raw
In response to Re: basebackup/lz4 crash  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: basebackup/lz4 crash
List pgsql-hackers
Hi,

> I think your proposed change is OK, modulo some comments. But I think
> maybe we ought to delete all the stuff related to compressed_bound
> from bbstreamer_lz4_compressor_new() as well, because I don't see that
> there's any point. And then I think we should also add logic similar
> to what you've added here to bbstreamer_lz4_compressor_finalize(), so
> that we're not making the assumption that the buffer will get enlarged
> at some earlier point.
>
> Thoughts?
I agree that we should remove the compression bound stuff from
bbstreamer_lz4_compressor_new() and add a fix in
bbstreamer_lz4_compressor_content() and bbstreamer_lz4_compressor_finalize()
to enlarge the buffer if it falls short of the compress bound.

Patch attached.

Thanks,
Dipesh
Attachment

pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Higher level questions around shared memory stats
Next
From: Michael Paquier
Date:
Subject: Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas