@@ -1357,7 +1357,6 @@ Optional Features:
1357
1357
--enable-debug build with debugging symbols (-g)
1358
1358
--enable-profiling build with profiling enabled
1359
1359
--enable-dtrace build with DTrace support
1360
- --disable-segmented-files disable data file segmentation (requires largefile support)
1361
1360
--enable-depend turn on automatic dependency tracking
1362
1361
--enable-cassert enable assertion checks (for debugging)
1363
1362
--enable-thread-safety make client libraries thread-safe
@@ -1373,7 +1372,9 @@ Optional Packages:
1373
1372
--with-includes=DIRS look for additional header files in DIRS
1374
1373
--with-libraries=DIRS look for additional libraries in DIRS
1375
1374
--with-libs=DIRS alternative spelling of --with-libraries
1376
- --with-pgport=PORTNUM change default port number [5432]
1375
+ --with-pgport=PORTNUM set default port number [5432]
1376
+ --with-blocksize=BLOCKSIZE set block size in kB [8]
1377
+ --with-segsize=SEGSIZE set segment size in GB [1]
1377
1378
--with-tcl build Tcl modules (PL/Tcl)
1378
1379
--with-tclconfig=DIR tclConfig.sh is in DIR
1379
1380
--with-perl build Perl modules (PL/Perl)
@@ -2549,34 +2550,102 @@ fi
2549
2550
2550
2551
2551
2552
#
2552
- # Data file segmentation
2553
+ # Block size
2553
2554
#
2555
+ { echo "$as_me:$LINENO: checking for block size" >&5
2556
+ echo $ECHO_N "checking for block size... $ECHO_C" >&6; }
2554
2557
2555
- pgac_args="$pgac_args enable_segmented_files "
2558
+ pgac_args="$pgac_args with_blocksize "
2556
2559
2557
- # Check whether --enable-segmented-files was given.
2558
- if test "${enable_segmented_files+set}" = set; then
2559
- enableval=$enable_segmented_files;
2560
- case $enableval in
2560
+
2561
+ # Check whether --with-blocksize was given.
2562
+ if test "${with_blocksize+set}" = set; then
2563
+ withval=$with_blocksize;
2564
+ case $withval in
2561
2565
yes)
2562
- :
2566
+ { { echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2567
+ echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2568
+ { (exit 1); exit 1; }; }
2563
2569
;;
2564
2570
no)
2565
- :
2571
+ { { echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2572
+ echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2573
+ { (exit 1); exit 1; }; }
2566
2574
;;
2567
2575
*)
2568
- { { echo "$as_me:$LINENO: error: no argument expected for --enable-segmented-files option" >&5
2569
- echo "$as_me: error: no argument expected for --enable-segmented-files option" >&2;}
2570
- { (exit 1); exit 1; }; }
2576
+ blocksize=$withval
2571
2577
;;
2572
2578
esac
2573
2579
2574
2580
else
2575
- enable_segmented_files=yes
2581
+ blocksize=8
2582
+ fi
2583
+
2584
+
2585
+ case ${blocksize} in
2586
+ 1) BLCKSZ=1024;;
2587
+ 2) BLCKSZ=2048;;
2588
+ 4) BLCKSZ=4096;;
2589
+ 8) BLCKSZ=8192;;
2590
+ 16) BLCKSZ=16384;;
2591
+ 32) BLCKSZ=32768;;
2592
+ *) { { echo "$as_me:$LINENO: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&5
2593
+ echo "$as_me: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&2;}
2594
+ { (exit 1); exit 1; }; }
2595
+ esac
2596
+ { echo "$as_me:$LINENO: result: ${blocksize}kB" >&5
2597
+ echo "${ECHO_T}${blocksize}kB" >&6; }
2598
+
2599
+
2600
+ cat >>confdefs.h <<_ACEOF
2601
+ #define BLCKSZ ${BLCKSZ}
2602
+ _ACEOF
2603
+
2604
+
2605
+ #
2606
+ # File segment size
2607
+ #
2608
+ { echo "$as_me:$LINENO: checking for segment size" >&5
2609
+ echo $ECHO_N "checking for segment size... $ECHO_C" >&6; }
2610
+
2611
+ pgac_args="$pgac_args with_segsize"
2612
+
2576
2613
2614
+ # Check whether --with-segsize was given.
2615
+ if test "${with_segsize+set}" = set; then
2616
+ withval=$with_segsize;
2617
+ case $withval in
2618
+ yes)
2619
+ { { echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2620
+ echo "$as_me: error: argument required for --with-segsize option" >&2;}
2621
+ { (exit 1); exit 1; }; }
2622
+ ;;
2623
+ no)
2624
+ { { echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2625
+ echo "$as_me: error: argument required for --with-segsize option" >&2;}
2626
+ { (exit 1); exit 1; }; }
2627
+ ;;
2628
+ *)
2629
+ segsize=$withval
2630
+ ;;
2631
+ esac
2632
+
2633
+ else
2634
+ segsize=1
2577
2635
fi
2578
2636
2579
2637
2638
+ # this expression is set up to avoid unnecessary integer overflow
2639
+ RELSEG_SIZE=`expr '(' 1024 '*' ${segsize} / ${blocksize} ')' '*' 1024`
2640
+ test $? -eq 0 || exit 1
2641
+ { echo "$as_me:$LINENO: result: ${segsize}GB" >&5
2642
+ echo "${ECHO_T}${segsize}GB" >&6; }
2643
+
2644
+
2645
+ cat >>confdefs.h <<_ACEOF
2646
+ #define RELSEG_SIZE ${RELSEG_SIZE}
2647
+ _ACEOF
2648
+
2580
2649
2581
2650
#
2582
2651
# C compiler
@@ -24287,12 +24356,11 @@ _ACEOF
24287
24356
24288
24357
24289
24358
24290
- if test "$ac_cv_sizeof_off_t" -lt 8 -o "$enable_segmented_files" = "yes"; then
24291
-
24292
- cat >>confdefs.h <<\_ACEOF
24293
- #define USE_SEGMENTED_FILES 1
24294
- _ACEOF
24295
-
24359
+ # If we don't have largefile support, can't handle segsize >= 2GB.
24360
+ if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
24361
+ { { echo "$as_me:$LINENO: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&5
24362
+ echo "$as_me: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&2;}
24363
+ { (exit 1); exit 1; }; }
24296
24364
fi
24297
24365
24298
24366
# SunOS doesn't handle negative byte comparisons properly with +/- return
0 commit comments