From f718cb1f9bb4c86579ad8c42e8169bb6f3967d34 Mon Sep 17 00:00:00 2001
From: Tomas Vondra <tomas@vondra.me>
Date: Tue, 30 Sep 2025 13:00:10 +0200
Subject: [PATCH v20251001 21/25] try LZ4_compress_fast

---
 src/backend/storage/file/buffile.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/backend/storage/file/buffile.c b/src/backend/storage/file/buffile.c
index 881fc44faa3..e3d4e2a342e 100644
--- a/src/backend/storage/file/buffile.c
+++ b/src/backend/storage/file/buffile.c
@@ -774,9 +774,10 @@ BufFileDumpBuffer(BufFile *file)
 					 * The length is stored at the beginning, we'll fill it in
 					 * at the end.
 					 */
-					cSize = LZ4_compress_default(file->buffer.data,
-												 cData + sizeof(CompressHeader),
-												 file->nbytes, cBufferSize);
+					cSize = LZ4_compress_fast(file->buffer.data,
+											  cData + sizeof(CompressHeader),
+											  file->nbytes, cBufferSize,
+											  10);	/* somewhat higher value */
 					if (cSize == 0)
 					{
 						ereport(ERROR,
-- 
2.51.0

