Commit b1444b09 authored by Bruce Momjian's avatar Bruce Momjian

Update tuple size check.

parent 8dd3407b
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -162,10 +162,13 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
pageHeader = (Page) BufferGetPage(buffer); pageHeader = (Page) BufferGetPage(buffer);
PageInit(pageHeader, BufferGetPageSize(buffer), 0); PageInit(pageHeader, BufferGetPageSize(buffer), 0);
if (len > PageGetFreeSpace(pageHeader) && len <= MaxTupleSize) if (len > PageGetFreeSpace(pageHeader))
elog(ERROR, "Tuple is too big: size %d", len); 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) if (!relation->rd_myxactonly)
UnlockPage(relation, 0, ExclusiveLock); UnlockPage(relation, 0, ExclusiveLock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment