Re: Compression of bigger WAL records

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Cc: pgsql-hackers mailing list <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Japin Li <japinli(at)hotmail(dot)com>
Subject: Re: Compression of bigger WAL records
Date: 2026-11-08 07:49:50
Message-ID: 17A14E6D-9ECA-4E15-AAF7-1EAED2568788@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Zsolt!

On 26 Oct 2026, Zsolt Parragi wrote:
> Won't this result in a performance regression with the additional
> blocks when the header crosses multiple pages?

v12 stops nonblocking read-ahead at a split header even with free decode
space. In v13 it assembles the record and retries allocation from the
decode ring. If the ring is full, it yields without advancing
NextRecPtr.

> Shouldn't this flag be unset after decompression?

Agreed. With streams enabled, replication origin SET and DROP records
are reported as UNKNOWN. v13 clears XLR_COMPRESSED after decompression.
The new test checks both record names and that compression was used.
pg_waldump still displays physical lengths when they differ from decoded
lengths.

> And: it seems like that the patchset tries to compress incompressible
> FPI records twice (first record, then whole page, failing both times)?

I removed the second codec pass in 0001.

Thank you!

Best regards, Andrey Borodin.

Attachment Content-Type Size
v13-0001-Add-whole-record-WAL-compression-alongside-FPI-c.patch application/octet-stream 68.2 KB
v13-0002-Expose-physical-WAL-record-sizes-in-pg_walinspec.patch application/octet-stream 13.4 KB
v13-0003-WIP-compress-WAL-records-against-earlier-records.patch application/octet-stream 69.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-11-08 08:28:47 Re: Avoid duplicate file references in backend .pot file
Previous Message Osama Abdul Qader 2026-11-08 07:39:21 Re: Avoid using raw xmin of frozen tuples in logicalrep conflict detection