7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.41 1999/02/13 23:18:35 momjian Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.42 1999/04/05 22:25:11 tgl Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
33
33
* The magnetic disk storage manager keeps track of open file descriptors
34
34
* in its own descriptor pool. This happens for two reasons. First, at
35
35
* transaction boundaries, we walk the list of descriptors and flush
36
- * anything that we've dirtied in the current transaction. Second, we
37
- * have to support relations of > 4GBytes. In order to do this, we break
38
- * relations up into chunks of < 2GBytes and store one chunk in each of
39
- * several files that represent the relation.
36
+ * anything that we've dirtied in the current transaction. Second, we want
37
+ * to support relations larger than the OS' file size limit (often 2GBytes).
38
+ * In order to do that, we break relations up into chunks of < 2GBytes
39
+ * and store one chunk in each of several files that represent the relation.
40
+ * See the BLCKSZ and RELSEG_SIZE configuration constants in include/config.h.
40
41
*/
41
42
42
43
typedef struct _MdfdVec
@@ -59,30 +60,6 @@ static MemoryContext MdCxt;
59
60
#define MDFD_DIRTY (uint16) 0x01
60
61
#define MDFD_FREE (uint16) 0x02
61
62
62
- /*
63
- * RELSEG_SIZE appears to be the number of segments that can
64
- * be in a disk file. It was defined as 262144 based on 8k
65
- * blocks, but now that the block size can be changed, this
66
- * has to be calculated at compile time. Otherwise, the file
67
- * size limit would not work out to 2-gig (2147483648).
68
- *
69
- * The number needs to be (2 ** 31) / BLCKSZ, but to be keep
70
- * the math under MAXINT, pre-divide by 256 and use ...
71
- *
72
- * (((2 ** 23) / BLCKSZ) * (2 ** 8))
73
- *
74
- * 07 Jan 98 darrenk
75
- *
76
- * Now possibly let the OS handle it...
77
- *
78
- * 19 Mar 98 darrenk
79
- *
80
- */
81
-
82
- #ifndef LET_OS_MANAGE_FILESIZE
83
- #define RELSEG_SIZE ((8388608 / BLCKSZ) * 256)
84
- #endif
85
-
86
63
/* routines declared here */
87
64
static MdfdVec * _mdfd_openseg (Relation reln , int segno , int oflags );
88
65
static MdfdVec * _mdfd_getseg (Relation reln , int blkno , int oflag );
0 commit comments