@@ -1373,8 +1373,10 @@ Optional Packages:
13731373 --with-libraries=DIRS look for additional libraries in DIRS
13741374 --with-libs=DIRS alternative spelling of --with-libraries
13751375 --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]
1376+ --with-blocksize=BLOCKSIZE set table block size in kB [8]
1377+ --with-segsize=SEGSIZE set table segment size in GB [1]
1378+ --with-wal-blocksize=BLOCKSIZE set WAL block size in kB [8]
1379+ --with-wal-segsize=SEGSIZE set WAL segment size in MB [16]
13781380 --with-tcl build Tcl modules (PL/Tcl)
13791381 --with-tclconfig=DIR tclConfig.sh is in DIR
13801382 --with-perl build Perl modules (PL/Perl)
@@ -2603,7 +2605,7 @@ _ACEOF
26032605
26042606
26052607#
2606- #File segment size
2608+ #Relation segment size
26072609#
26082610{ echo "$as_me:$LINENO: checking for segment size" >&5
26092611echo $ECHO_N "checking for segment size... $ECHO_C" >&6; }
@@ -2647,6 +2649,114 @@ cat >>confdefs.h <<_ACEOF
26472649_ACEOF
26482650
26492651
2652+ #
2653+ # WAL block size
2654+ #
2655+ { echo "$as_me:$LINENO: checking for WAL block size" >&5
2656+ echo $ECHO_N "checking for WAL block size... $ECHO_C" >&6; }
2657+
2658+ pgac_args="$pgac_args with_wal_blocksize"
2659+
2660+
2661+ # Check whether --with-wal-blocksize was given.
2662+ if test "${with_wal_blocksize+set}" = set; then
2663+ withval=$with_wal_blocksize;
2664+ case $withval in
2665+ yes)
2666+ { { echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
2667+ echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
2668+ { (exit 1); exit 1; }; }
2669+ ;;
2670+ no)
2671+ { { echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
2672+ echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
2673+ { (exit 1); exit 1; }; }
2674+ ;;
2675+ *)
2676+ wal_blocksize=$withval
2677+ ;;
2678+ esac
2679+
2680+ else
2681+ wal_blocksize=8
2682+ fi
2683+
2684+
2685+ case ${wal_blocksize} in
2686+ 1) XLOG_BLCKSZ=1024;;
2687+ 2) XLOG_BLCKSZ=2048;;
2688+ 4) XLOG_BLCKSZ=4096;;
2689+ 8) XLOG_BLCKSZ=8192;;
2690+ 16) XLOG_BLCKSZ=16384;;
2691+ 32) XLOG_BLCKSZ=32768;;
2692+ 64) XLOG_BLCKSZ=65536;;
2693+ *) { { echo "$as_me:$LINENO: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&5
2694+ echo "$as_me: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&2;}
2695+ { (exit 1); exit 1; }; }
2696+ esac
2697+ { echo "$as_me:$LINENO: result: ${wal_blocksize}kB" >&5
2698+ echo "${ECHO_T}${wal_blocksize}kB" >&6; }
2699+
2700+
2701+ cat >>confdefs.h <<_ACEOF
2702+ #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
2703+ _ACEOF
2704+
2705+
2706+ #
2707+ # WAL segment size
2708+ #
2709+ { echo "$as_me:$LINENO: checking for WAL segment size" >&5
2710+ echo $ECHO_N "checking for WAL segment size... $ECHO_C" >&6; }
2711+
2712+ pgac_args="$pgac_args with_wal_segsize"
2713+
2714+
2715+ # Check whether --with-wal-segsize was given.
2716+ if test "${with_wal_segsize+set}" = set; then
2717+ withval=$with_wal_segsize;
2718+ case $withval in
2719+ yes)
2720+ { { echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
2721+ echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
2722+ { (exit 1); exit 1; }; }
2723+ ;;
2724+ no)
2725+ { { echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
2726+ echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
2727+ { (exit 1); exit 1; }; }
2728+ ;;
2729+ *)
2730+ wal_segsize=$withval
2731+ ;;
2732+ esac
2733+
2734+ else
2735+ wal_segsize=16
2736+ fi
2737+
2738+
2739+ case ${wal_segsize} in
2740+ 1) ;;
2741+ 2) ;;
2742+ 4) ;;
2743+ 8) ;;
2744+ 16) ;;
2745+ 32) ;;
2746+ 64) ;;
2747+ *) { { echo "$as_me:$LINENO: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&5
2748+ echo "$as_me: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&2;}
2749+ { (exit 1); exit 1; }; }
2750+ esac
2751+ { echo "$as_me:$LINENO: result: ${wal_segsize}MB" >&5
2752+ echo "${ECHO_T}${wal_segsize}MB" >&6; }
2753+
2754+
2755+ cat >>confdefs.h <<_ACEOF
2756+ #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
2757+ _ACEOF
2758+
2759+
26502760#
26512761# C compiler
26522762#