Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf79962d

Browse files
committed
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 byLZ4F_freeCompressionContext() to finish the cleanup. The code as-is wasnot broken, but the LZ4F_compressEnd() proves to not be necessary asthere 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
1 parent411137a commitf79962d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

‎src/bin/pg_basebackup/walmethods.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ dir_open_for_write(const char *pathname, const char *temp_suffix, size_t pad_to_
193193
{
194194
/* If write didn't set errno, assume problem is no disk space */
195195
dir_data->lasterrno=errno ?errno :ENOSPC;
196-
(void)LZ4F_compressEnd(ctx,lz4buf,lz4bufsize,NULL);
197196
(void)LZ4F_freeCompressionContext(ctx);
198197
pg_free(lz4buf);
199198
close(fd);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp