@@ -842,6 +842,7 @@ enable_dtrace
842
842
enable_tap_tests
843
843
with_blocksize
844
844
with_segsize
845
+ with_segsize_blocks
845
846
with_wal_blocksize
846
847
with_CC
847
848
with_llvm
@@ -1551,6 +1552,8 @@ Optional Packages:
1551
1552
--with-blocksize=BLOCKSIZE
1552
1553
set table block size in kB [8]
1553
1554
--with-segsize=SEGSIZE set table segment size in GB [1]
1555
+ --with-segsize-blocks=SEGSIZE_BLOCKS
1556
+ set table segment size in blocks [0]
1554
1557
--with-wal-blocksize=BLOCKSIZE
1555
1558
set WAL block size in kB [8]
1556
1559
--with-CC=CMD set compiler (deprecated)
@@ -3731,8 +3734,6 @@ _ACEOF
3731
3734
#
3732
3735
# Relation segment size
3733
3736
#
3734
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3735
- $as_echo_n "checking for segment size... " >&6; }
3736
3737
3737
3738
3738
3739
@@ -3756,12 +3757,52 @@ else
3756
3757
fi
3757
3758
3758
3759
3759
- # this expression is set up to avoid unnecessary integer overflow
3760
- # blocksize is already guaranteed to be a factor of 1024
3761
- RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3762
- test $? -eq 0 || exit 1
3763
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3760
+
3761
+
3762
+
3763
+ # Check whether --with-segsize-blocks was given.
3764
+ if test "${with_segsize_blocks+set}" = set; then :
3765
+ withval=$with_segsize_blocks;
3766
+ case $withval in
3767
+ yes)
3768
+ as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3769
+ ;;
3770
+ no)
3771
+ as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3772
+ ;;
3773
+ *)
3774
+ segsize_blocks=$withval
3775
+ ;;
3776
+ esac
3777
+
3778
+ else
3779
+ segsize_blocks=0
3780
+ fi
3781
+
3782
+
3783
+
3784
+ # If --with-segsize-blocks is non-zero, it is used, --with-segsize
3785
+ # otherwise. segsize-blocks is only really useful for developers wanting to
3786
+ # test segment related code. Warn if both are used.
3787
+ if test $segsize_blocks -ne 0 -a $segsize -ne 1; then
3788
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&5
3789
+ $as_echo "$as_me: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&2;}
3790
+ fi
3791
+
3792
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3793
+ $as_echo_n "checking for segment size... " >&6; }
3794
+ if test $segsize_blocks -eq 0; then
3795
+ # this expression is set up to avoid unnecessary integer overflow
3796
+ # blocksize is already guaranteed to be a factor of 1024
3797
+ RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3798
+ test $? -eq 0 || exit 1
3799
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3764
3800
$as_echo "${segsize}GB" >&6; }
3801
+ else
3802
+ RELSEG_SIZE=$segsize_blocks
3803
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RELSEG_SIZE} blocks" >&5
3804
+ $as_echo "${RELSEG_SIZE} blocks" >&6; }
3805
+ fi
3765
3806
3766
3807
3767
3808
cat >>confdefs.h <<_ACEOF
@@ -15450,9 +15491,11 @@ _ACEOF
15450
15491
15451
15492
15452
15493
15453
- # If we don't have largefile support, can't handle segsize >= 2GB.
15454
- if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15455
- as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15494
+ # If we don't have largefile support, can't handle segment size >= 2GB.
15495
+ if test "$ac_cv_sizeof_off_t" -lt 8; then
15496
+ if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
15497
+ as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15498
+ fi
15456
15499
fi
15457
15500
15458
15501
# The cast to long int works around a bug in the HP C Compiler
0 commit comments