Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5763683

Browse files
committed
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.
1 parent 5ce851d commit 5763683

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/include/config.h.in

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,18 @@
3232
* Thus, the maximum size of a single file is RELSEG_SIZE * BLCKSZ;
3333
* relations bigger than that are divided into multiple files.
3434
*
35-
* CAUTION: RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file size.
36-
* This is typically 2Gb or 4Gb in a 32-bit operating system. By default,
37-
* we make the limit one billion bytes to avoid any possible integer-overflow
35+
* CAUTION: RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file
36+
* size. This is typically 2Gb or 4Gb in a 32-bit operating system. By
37+
* default, we make the limit 1Gb to avoid any possible integer-overflow
3838
* problems within the OS. A limit smaller than necessary only means we
39-
* divide a large relation into more chunks than necessary, so it seems best
40-
* to err in the direction of a small limit.
39+
* divide a large relation into more chunks than necessary, so it seems
40+
* best to err in the direction of a small limit. (Besides, a power-of-2
41+
* value saves a few cycles in md.c.)
4142
*
4243
* CAUTION: you had best do an initdb if you change either BLCKSZ or
4344
* RELSEG_SIZE.
4445
*/
45-
#define RELSEG_SIZE (1000000000 / BLCKSZ)
46+
#define RELSEG_SIZE (0x40000000 / BLCKSZ)
4647

4748
/*
4849
* The following is set using configure.

0 commit comments

Comments
 (0)