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/include/storage/bufpage.h | |
| parent | f0445dcbc417f03b79f4502570732924b39e5cc5 (diff) | |
| download | postgresql-374bb5d2610d0f520abbc602bbf1d6b9c533f335.tar.gz | |
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/include/storage/bufpage.h')
| -rw-r--r-- | src/include/storage/bufpage.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h index befb6b0849..6df6cdf734 100644 --- a/src/include/storage/bufpage.h +++ b/src/include/storage/bufpage.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: bufpage.h,v 1.13 1997/09/08 21:54:20 momjian Exp $ + * $Id: bufpage.h,v 1.14 1998/01/13 04:05:11 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -86,6 +86,9 @@ * * note that this is actually limited to 2^13 because we have limited * ItemIdData.lp_off and ItemIdData.lp_len to 13 bits (see itemid.h). + * + * uint16 is still valid, but the limit has been raised to 15 bits. + * 06 Jan 98 - darrenk */ typedef uint16 LocationIndex; @@ -98,6 +101,9 @@ typedef uint16 LocationIndex; * page header, opaque space and a minimal tuple; * on the high end, we can only support pages up * to 8KB because lp_off/lp_len are 13 bits. + * + * see above comment. Now use 15 bits and pages + * up to 32KB at your own risk. */ typedef struct OpaqueData { @@ -191,8 +197,11 @@ typedef enum * * XXX currently all page sizes are "valid" but we only actually * use BLCKSZ. + * + * 01/06/98 Now does something useful. darrenk + * */ -#define PageSizeIsValid(pageSize) 1 +#define PageSizeIsValid(pageSize) ((pageSize) == BLCKSZ) /* * PageGetPageSize -- |
