From 5763683ce45d2f1f666b2a9ac0964d011511ee36 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 6 Apr 1999 03:04:22 +0000 Subject: [PATCH] On reflection, filesize limit ought to be an exact power of 2 to save a few cycles in md.c. So, make it 2^30 not 10^9. --- src/include/config.h.in | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/include/config.h.in b/src/include/config.h.in index 49aac61ebb..fb53b8d74a 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -32,17 +32,18 @@ * Thus, the maximum size of a single file is RELSEG_SIZE * BLCKSZ; * relations bigger than that are divided into multiple files. * - * CAUTION: RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file size. - * This is typically 2Gb or 4Gb in a 32-bit operating system. By default, - * we make the limit one billion bytes to avoid any possible integer-overflow + * CAUTION: RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file + * size. This is typically 2Gb or 4Gb in a 32-bit operating system. By + * default, we make the limit 1Gb to avoid any possible integer-overflow * problems within the OS. A limit smaller than necessary only means we - * divide a large relation into more chunks than necessary, so it seems best - * to err in the direction of a small limit. + * divide a large relation into more chunks than necessary, so it seems + * best to err in the direction of a small limit. (Besides, a power-of-2 + * value saves a few cycles in md.c.) * * CAUTION: you had best do an initdb if you change either BLCKSZ or * RELSEG_SIZE. */ -#define RELSEG_SIZE (1000000000 / BLCKSZ) +#define RELSEG_SIZE (0x40000000 / BLCKSZ) /* * The following is set using configure. -- 2.40.0