Re: Proposal: Adding compression of temporary files - Mailing list pgsql-hackers

From lakshmi
Subject Re: Proposal: Adding compression of temporary files
Date
Msg-id CAEvyyTjiUhEUX5jxJkHHncnKSuCmf=MitZLtDt+Z6WsNNo0vCQ@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: Adding compression of temporary files  (Zsolt Parragi <zsolt.parragi@percona.com>)
Responses Re: Proposal: Adding compression of temporary files
List pgsql-hackers
Hi Filip,

I tested both patches on current master using git am -3 .They apply cleanly,build fine,and the temp_file _compression GUC works as expected.
Query results are unchanged.

For hash join spill test,temp files were created as expected,but the logged size were same for no,lz4,and pglz,which seems consistent with fixed-size fileset chunking.It might be helpful to briefly note this in the documentation to avoid confusion.

Thanks for working on this .
best regards,
lakshmi

On Tue, Jan 20, 2026 at 4:10 AM Zsolt Parragi <zsolt.parragi@percona.com> wrote:
Hello!

I tried to review the code. It compiled, the test suite passed.

I noticed two typos:

buffile.c:77 - "Disaled"
buffile.c:133 - "mathods"

And a few other small findings:

buffile.h:35 and buffile.c:63 - same constants defined first as an
Enum and then as #defines - code builds properly without the defines.

buffile.c:121 - compress_tempfile is defined, set to false at :167,
but never used otherwise

guc_tables.c:470 - the comment says that pglz isn't supported yet, but
we have a value for it, and I see support for it in the code

buffile.c:659: (and at other places) if USE_LZ4 is undefined, the
codepath doesn't do anything. I think these ifdefs should follow how
other compression code works, such as wal compression where there's an
#else path with elog(ERROR, ...)
Similarly, maybe there should be an explicit TEMP_NONE_COMPRESSION
branch that does nothing, and the default branch should be an error?

buffile.c:265: If seek isn't supported/limited, shouldn't there be at
least an assertion about it in BufFileSeek? And tell isn't mentioned,
but it seems to me that tell also doesn't work properly.

pgsql-hackers by date:

Previous
From: David Geier
Date:
Subject: Re: Change copyObject() to use typeof_unqual
Next
From: Amit Kapila
Date:
Subject: Re: Logical Replication of sequences