Skip to content
Snippets Groups Projects
Commit b1444b09 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Update tuple size check.

parent 8dd3407b
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment