aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-07-03 01:56:16 +0000
committerBruce Momjian <bruce@momjian.us>1999-07-03 01:56:16 +0000
commitb1444b093486bcbc3bacfd48b668c87d80b1c454 (patch)
tree5646146106a77275a029f8980cfb8201d498a5d8 /src
parent8dd3407bf5e7550d2c1707740a50422228106eb3 (diff)
downloadpostgresql-b1444b093486bcbc3bacfd48b668c87d80b1c454.tar.gz
postgresql-b1444b093486bcbc3bacfd48b668c87d80b1c454.zip
Update tuple size check.
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/heap/hio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 20544a285d5..c71b71e6e1b 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Id: hio.c,v 1.21 1999/07/03 01:47:02 momjian Exp $
+ * $Id: hio.c,v 1.22 1999/07/03 01:56:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -162,10 +162,13 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
pageHeader = (Page) BufferGetPage(buffer);
PageInit(pageHeader, BufferGetPageSize(buffer), 0);
- if (len > PageGetFreeSpace(pageHeader) && len <= MaxTupleSize)
+ if (len > PageGetFreeSpace(pageHeader))
elog(ERROR, "Tuple is too big: size %d", len);
}
+ if (len > MaxTupleSize)
+ elog(ERROR, "Tuple is too big: size %d, max size %d", len, MaxTupleSize);
+
if (!relation->rd_myxactonly)
UnlockPage(relation, 0, ExclusiveLock);