diff options
author | Marc G. Fournier <scrappy@hub.org> | 1998-01-13 04:05:12 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1998-01-13 04:05:12 +0000 |
commit | 374bb5d2610d0f520abbc602bbf1d6b9c533f335 (patch) | |
tree | 1d0fbc84ce15ea7d9d077ecad5cf96a0ec8a69c5 /src/backend/access | |
parent | f0445dcbc417f03b79f4502570732924b39e5cc5 (diff) | |
download | postgresql-374bb5d2610d0f520abbc602bbf1d6b9c533f335.tar.gz postgresql-374bb5d2610d0f520abbc602bbf1d6b9c533f335.zip |
Some *very* major changes by darrenk@insightdist.com (Darren King)
==========================================
What follows is a set of diffs that cleans up the usage of BLCKSZ.
As a side effect, the person compiling the code can change the
value of BLCKSZ _at_their_own_risk_. By that, I mean that I've
tried it here at 4096 and 16384 with no ill-effects. A value
of 4096 _shouldn't_ affect much as far as the kernel/file system
goes, but making it bigger than 8192 can have severe consequences
if you don't know what you're doing. 16394 worked for me, _BUT_
when I went to 32768 and did an initdb, the SCSI driver broke and
the partition that I was running under went to hell in a hand
basket. Had to reboot and do a good bit of fsck'ing to fix things up.
The patch can be safely applied though. Just leave BLCKSZ = 8192
and everything is as before. It basically only cleans up all of the
references to BLCKSZ in the code.
If this patch is applied, a comment in the config.h file though above
the BLCKSZ define with warning about monkeying around with it would
be a good idea.
Darren darrenk@insightdist.com
(Also cleans up some of the #includes in files referencing BLCKSZ.)
==========================================
Diffstat (limited to 'src/backend/access')
-rw-r--r-- | src/backend/access/nbtree/nbtsort.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c index e292e21b7af..0ffaa5330ec 100644 --- a/src/backend/access/nbtree/nbtsort.c +++ b/src/backend/access/nbtree/nbtsort.c @@ -5,7 +5,7 @@ * * * IDENTIFICATION - * $Id: nbtsort.c,v 1.26 1998/01/07 21:01:59 momjian Exp $ + * $Id: nbtsort.c,v 1.27 1998/01/13 04:03:41 scrappy Exp $ * * NOTES * @@ -49,13 +49,12 @@ #include <fcntl.h> -#include <postgres.h> - -#include <utils/memutils.h> -#include <storage/bufpage.h> -#include <access/nbtree.h> -#include <storage/bufmgr.h> +#include "postgres.h" +#include "access/nbtree.h" +#include "storage/bufmgr.h" +#include "storage/bufpage.h" +#include "utils/memutils.h" #ifndef HAVE_MEMMOVE #include <regex/utils.h> @@ -64,7 +63,7 @@ #endif #ifdef BTREE_BUILD_STATS -#include <tcop/tcopprot.h> +#include "tcop/tcopprot.h" extern int ShowExecutorStats; #endif @@ -85,7 +84,7 @@ static void _bt_uppershutdown(Relation index, BTPageState *state); #define FASTBUILD_MERGE #define MAXTAPES (7) -#define TAPEBLCKSZ (MAXBLCKSZ << 2) +#define TAPEBLCKSZ (BLCKSZ << 2) #define TAPETEMP "pg_btsortXXXXXX" extern int NDirectFileRead; @@ -458,7 +457,7 @@ _bt_tapewrite(BTTapeBlock *tape, int eor) { tape->bttb_eor = eor; FileWrite(tape->bttb_fd, (char *) tape, TAPEBLCKSZ); - NDirectFileWrite += TAPEBLCKSZ / MAXBLCKSZ; + NDirectFileWrite += TAPEBLCKSZ / BLCKSZ; _bt_tapereset(tape); } @@ -496,7 +495,7 @@ _bt_taperead(BTTapeBlock *tape) return (0); } Assert(tape->bttb_magic == BTTAPEMAGIC); - NDirectFileRead += TAPEBLCKSZ / MAXBLCKSZ; + NDirectFileRead += TAPEBLCKSZ / BLCKSZ; return (1); } |