From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Remove useless LZ4 system call on failure when writing file head |
Date: | 2021-11-24 11:14:08 |
Message-ID: | E1mpqE4-0005hz-9W@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2021-11-24 13:20:37 | pgsql: Fix corner-case failure to detect improper timeline switch. |
Previous Message | David Rowley | 2021-11-24 10:30:27 | pgsql: Flush Memoize cache when non-key parameters change, take 2 |