From: | "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Compression of bigger WAL records |
Date: | 2025-01-21 18:24:12 |
Message-ID: | 73E8D8A0-F5C3-45E8-8DFC-60AA86F8B890@yandex-team.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 12 Jan 2025, at 17:43, Andrey M. Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
>
> I attach a prototype patch.
Here's v2, now it passes all the tests with wal_debug.
Some stats. On this test
create table a as select random() from generate_series(1,1e7);
select pg_stat_reset_shared('wal'); create index on a(random ); select pg_size_pretty(wal_bytes) from pg_stat_wal;
set wal_compression to 'lz4';
select pg_stat_reset_shared('wal'); create index on a(random ); select pg_size_pretty(wal_bytes) from pg_stat_wal;
set wal_compression to 'pglz';
select pg_stat_reset_shared('wal'); create index on a(random ); select pg_size_pretty(wal_bytes) from pg_stat_wal;
set wal_compression to 'zstd';
select pg_stat_reset_shared('wal'); create index on a(random ); select pg_size_pretty(wal_bytes) from pg_stat_wal;
I observe WAL size of the index:
method HEAD patched
pglz 193 MB 193 MB
lz4 160 MB 132 MB
zstd 125 MB 97 MB
So, for lz4 and zstd this seems to be a significant reduction.
I'm planning to work on improving the patch quality.
Thanks!
Best regards, Andrey Borodin.
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Compress-big-WAL-records.patch | application/octet-stream | 43.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-01-21 18:27:15 | Re: Year of first commit |
Previous Message | Marcos Pegoraro | 2025-01-21 18:20:08 | Re: Year of first commit |