summaryrefslogtreecommitdiff
path: root/src/include/access/htup.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/access/htup.h')
-rw-r--r--src/include/access/htup.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/include/access/htup.h b/src/include/access/htup.h
index ddde6a466d1..eecc6959e89 100644
--- a/src/include/access/htup.h
+++ b/src/include/access/htup.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.89 2007/01/09 22:01:00 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.90 2007/02/05 04:22:18 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -314,19 +314,17 @@ do { \
#define BITMAPLEN(NATTS) (((int)(NATTS) + 7) / 8)
/*
- * MaxTupleSize is the maximum allowed size of a tuple, including header and
- * MAXALIGN alignment padding. Basically it's BLCKSZ minus the other stuff
- * that has to be on a disk page. The "other stuff" includes access-method-
- * dependent "special space", which we assume will be no more than
- * MaxSpecialSpace bytes (currently, on heap pages it's actually zero).
+ * MaxHeapTupleSize is the maximum allowed size of a heap tuple, including
+ * header and MAXALIGN alignment padding. Basically it's BLCKSZ minus the
+ * other stuff that has to be on a disk page. Since heap pages use no
+ * "special space", there's no deduction for that.
*
* NOTE: we do not need to count an ItemId for the tuple because
- * sizeof(PageHeaderData) includes the first ItemId on the page.
+ * sizeof(PageHeaderData) includes the first ItemId on the page. But beware
+ * of assuming that, say, you can fit 2 tuples of size MaxHeapTupleSize/2
+ * on the same page.
*/
-#define MaxSpecialSpace 32
-
-#define MaxTupleSize \
- (BLCKSZ - MAXALIGN(sizeof(PageHeaderData) + MaxSpecialSpace))
+#define MaxHeapTupleSize (BLCKSZ - MAXALIGN(sizeof(PageHeaderData)))
/*
* MaxHeapTuplesPerPage is an upper bound on the number of tuples that can