pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove useless LZ4 system call on failure when writing file head
Date: Wed, 24 Nov 2021 11:14:08 +0000
Message-ID: <E1mpqE4-0005hz-9W@gemulon.postgresql.org> (raw)

Remove useless LZ4 system call on failure when writing file header

If an error occurs when writing the LZ4 file header, LZ4F_compressEnd()
was called in the error code path of write(), followed by
LZ4F_freeCompressionContext() to finish the cleanup.  The code as-is was
not broken, but the LZ4F_compressEnd() proves to not be necessary as
there are no contents to flush at this stage, so remove it.

Per gripe from Jeevan Ladhe and Robert Haas.

Discussion: https://postgr.es/m/CAOgcT0PE33wbD7giAT1OSkNJt=p-vu8huq++qh=ny9O=SCP5aA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f79962d8264b8d205ce45a8aa11d1b37f9592a81

Modified Files
--------------
src/bin/pg_basebackup/walmethods.c | 1 -
1 file changed, 1 deletion(-)



Message-ID: <E1mpqE4-0005hz-9W@gemulon.postgresql.org>
Permalink:  ../E1mpqE4-0005hz-9W@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mpqE4-0005hz-9W@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Remove useless LZ4 system call on failure when writing file head
  In-Reply-To: <E1mpqE4-0005hz-9W@gemulon.postgresql.org>
  References: <E1mpqE4-0005hz-9W@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox