Re: allow segment size to be set to < 1GiB - Mailing list pgsql-hackers

From Andres Freund
Subject Re: allow segment size to be set to < 1GiB
Date
Msg-id 20221109022808.jktar3bohix2p5rf@awork3.anarazel.de
Whole thread Raw
In response to Re: allow segment size to be set to < 1GiB  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: allow segment size to be set to < 1GiB
Re: allow segment size to be set to < 1GiB
List pgsql-hackers
Hi,

On 2022-11-07 21:36:33 -0500, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2022-11-07 12:52:25 -0500, Tom Lane wrote:
> >> How about instead allowing the segment size to be set in pages?
> 
> > In addition or instead of --with-segsize/-Dsegsize?
> 
> In addition to.  What I meant by "instead" was to replace
> your proposal of --with-segsize-mb.

Working on updating the patch.

One semi-interesting bit is that <= 5 blocks per segment fails, because
corrupt_page_checksum() doesn't know about segments and
src/bin/pg_basebackup/t/010_pg_basebackup.pl does

# induce further corruption in 5 more blocks
$node->stop;
for my $i (1 .. 5)
{
    $node->corrupt_page_checksum($file_corrupt1, $i * $block_size);
}
$node->start;

I'd be content with not dealing with that given the use case of the
functionality? A buildfarm animal setting it to 10 seem to
suffice. Alternatively we could add segment support to
corrupt_page_checksum().

Opinions?

FWIW, with HEAD, all tests pass with -Dsegsize_blocks=6 on HEAD.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Add connection active, idle time to pg_stat_activity
Next
From: sho kato
Date:
Subject: Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL