]> granicus.if.org Git - postgresql/commitdiff
On reflection, filesize limit ought to be an exact power
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 6 Apr 1999 03:04:22 +0000 (03:04 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 6 Apr 1999 03:04:22 +0000 (03:04 +0000)
of 2 to save a few cycles in md.c.  So, make it 2^30 not 10^9.

src/include/config.h.in

index 49aac61ebbdecc552fcc6b5fe16878533657c2aa..fb53b8d74a004c6ea718df2ca235b284b2d67c59 100644 (file)
  * 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.