Re: Compression of bigger WAL records

2025-01-30 Thread wenhui qiu
Hi Andery I have a question ,If wal_compression_threshold is set to more than the block size of the wal log, then the FPI is not compressed, and if so, it might make sense to have a maximum value of this parameter that does not exceed the block size of the wal log? Best regards On Thu, Jan

Re: Compression of bigger WAL records

2025-01-30 Thread Andrey Borodin
> On 23 Jan 2025, at 20:13, Japin Li wrote: > > > I find this feature interesting; Thank you for your interest in the patch! > however, it cannot be applied to the current > master (b35434b134b) due to commit 32a18cc0a73. PFA a rebased version. > > I see the patch compresses the WAL recor

Re: Compression of bigger WAL records

2025-01-28 Thread Fujii Masao
On 2025/01/22 3:24, Andrey M. Borodin wrote: On 12 Jan 2025, at 17:43, Andrey M. Borodin wrote: I attach a prototype patch. Here's v2, now it passes all the tests with wal_debug. I like the idea of WAL compression more. With the current approach, each backend needs to allocate memory

Re: Compression of bigger WAL records

2025-01-23 Thread Japin Li
On Tue, 21 Jan 2025 at 23:24, "Andrey M. Borodin" wrote: >> On 12 Jan 2025, at 17:43, Andrey M. Borodin 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,1e

Re: Compression of bigger WAL records

2025-01-21 Thread Andrey M. Borodin
> On 12 Jan 2025, at 17:43, Andrey M. Borodin 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 );

Re: Compression of bigger WAL records

2025-01-12 Thread Andrey Borodin
Hi! Thanks for looking into this! > On 12 Jan 2025, at 23:36, Kirill Reshke wrote: > > initdb fails when configured with --without-zstd Yes, the patch is intended to demonstrate improvement when using Zstd. > On 12 Jan 2025, at 17:43, Andrey M. Borodin wrote: > > WAL_DEBUG and wal_compressio

Re: Compression of bigger WAL records

2025-01-12 Thread Kirill Reshke
I ./pgbin/bin/pg_waldump On Sun, 12 Jan 2025 at 17:43, Andrey M. Borodin wrote: > > Hi hackers! > > I propose a slight change to WAL compression: compress body of big records, > if it's bigger than some threshold. > Hi, initdb fails when configured with --without-zstd ``` reshke@ygp-jammy:

Compression of bigger WAL records

2025-01-12 Thread Andrey M. Borodin
Hi hackers! I propose a slight change to WAL compression: compress body of big records, if it's bigger than some threshold. ===Rationale=== 0. Better compression ratio for full page images when pages are compressed together. Consider following test: set wal_compression to 'zstd'; create table