Re: allow segment size to be set to < 1GiB

2022-12-07 Thread Andres Freund
Hi, On 2022-11-09 12:25:09 -0800, Andres Freund wrote: > Updated patch attached. I pushed it now. > I made one autoconf and one meson CI task use a small block size, but just to > ensure it work on both. I'd probably leave it set on one, so we keep the > coverage for cfbot? It doesn't seem to

Re: allow segment size to be set to < 1GiB

2022-11-17 Thread Andrew Dunstan
On 2022-11-17 Th 10:48, Tom Lane wrote: > Andres Freund writes: >> On 2022-11-17 09:58:48 -0500, Andrew Dunstan wrote: >>> Are we going to impose some sane minimum, or leave it up to developers >>> to discover that for themselves? >> I don't think we should. It's actually useful to e.g. use 1

Re: allow segment size to be set to < 1GiB

2022-11-17 Thread Andres Freund
On 2022-11-17 10:48:52 -0500, Tom Lane wrote: > Yeah, I think we should allow setting it to 1 block. This switch is > only for testing purposes (I hope the docs make that clear). "This option is only for developers, to test segment related code."

Re: allow segment size to be set to < 1GiB

2022-11-17 Thread Tom Lane
Andres Freund writes: > On 2022-11-17 09:58:48 -0500, Andrew Dunstan wrote: >> Are we going to impose some sane minimum, or leave it up to developers >> to discover that for themselves? > I don't think we should. It's actually useful to e.g. use 1 page sized > segments for testing, and with one

Re: allow segment size to be set to < 1GiB

2022-11-17 Thread Andres Freund
Hi, On 2022-11-17 09:58:48 -0500, Andrew Dunstan wrote: > On 2022-11-09 We 15:25, Andres Freund wrote: > > Hi, > > > > On 2022-11-09 14:44:42 -0500, Tom Lane wrote: > >> Andres Freund writes: > >>> A second question: Both autoconf and meson print the segment size as GB > >>> right > >>> now.

Re: allow segment size to be set to < 1GiB

2022-11-17 Thread Andrew Dunstan
On 2022-11-09 We 15:25, Andres Freund wrote: > Hi, > > On 2022-11-09 14:44:42 -0500, Tom Lane wrote: >> Andres Freund writes: >>> A second question: Both autoconf and meson print the segment size as GB >>> right >>> now. Obviously that'll print out a size of 0 for a segsize < 1GB. >>> The

Re: allow segment size to be set to < 1GiB

2022-11-09 Thread Andres Freund
Hi, On 2022-11-09 14:44:42 -0500, Tom Lane wrote: > Andres Freund writes: > > A second question: Both autoconf and meson print the segment size as GB > > right > > now. Obviously that'll print out a size of 0 for a segsize < 1GB. > > > The easiest way to would be to just display the number of

Re: allow segment size to be set to < 1GiB

2022-11-09 Thread Tom Lane
Andres Freund writes: > A second question: Both autoconf and meson print the segment size as GB right > now. Obviously that'll print out a size of 0 for a segsize < 1GB. > The easiest way to would be to just display the number of blocks, but that's > not particularly nice. Well, it would be

Re: allow segment size to be set to < 1GiB

2022-11-09 Thread Andres Freund
On 2022-11-08 18:28:08 -0800, Andres Freund wrote: > On 2022-11-07 21:36:33 -0500, Tom Lane wrote: > > Andres Freund 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

Re: allow segment size to be set to < 1GiB

2022-11-08 Thread Michael Paquier
On Tue, Nov 08, 2022 at 06:28:08PM -0800, Andres Freund wrote: > FWIW, with HEAD, all tests pass with -Dsegsize_blocks=6 on HEAD. Wow. The relation page size influences some of the plans in the main regression test suite, but this is nice to hear. +1 from me for more flexibility with this

Re: allow segment size to be set to < 1GiB

2022-11-08 Thread Andres Freund
Hi, On 2022-11-07 21:36:33 -0500, Tom Lane wrote: > Andres Freund 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

Re: allow segment size to be set to < 1GiB

2022-11-07 Thread Bharath Rupireddy
On Tue, Nov 8, 2022 at 8:06 AM Tom Lane wrote: > > Andres Freund 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"

Re: allow segment size to be set to < 1GiB

2022-11-07 Thread Tom Lane
Andres Freund 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. > Just

Re: allow segment size to be set to < 1GiB

2022-11-07 Thread Andres Freund
Hi, On 2022-11-07 12:52:25 -0500, Tom Lane wrote: > Andres Freund writes: > > In the attached patch I renamed --with-segsize= to --with-segsize-mb= / > > -Dsegsize= to -Dsegsize_mb=, to avoid somebody building with > > --with-segsize=2 > > or such suddenly ending up with an incompatible build.

Re: allow segment size to be set to < 1GiB

2022-11-07 Thread Tom Lane
Andres Freund writes: > In the attached patch I renamed --with-segsize= to --with-segsize-mb= / > -Dsegsize= to -Dsegsize_mb=, to avoid somebody building with --with-segsize=2 > or such suddenly ending up with an incompatible build. For the purpose of exercising these code paths with the

allow segment size to be set to < 1GiB

2022-11-07 Thread Andres Freund
Hi, I was recently reminded of my previous desire to allow setting the segment size to less than 1GB. It's pretty painful to test large amount of segments with a segment size of 1GB, certainly our regression test don't cover anything with multiple segments. This likely wouldn't have detected the