Commit 8dd3407b authored by Bruce Momjian's avatar Bruce Momjian

Fix for insertion of tuple too large.

parent 97dfff83
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Id: hio.c,v 1.20 1999/05/25 16:07:07 momjian Exp $ * $Id: hio.c,v 1.21 1999/07/03 01:47:02 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <storage/bufpage.h> #include <storage/bufpage.h>
#include <access/hio.h> #include <access/hio.h>
#include <access/htup.h>
#include <access/heapam.h> #include <access/heapam.h>
#include <storage/bufmgr.h> #include <storage/bufmgr.h>
#include <utils/memutils.h> #include <utils/memutils.h>
...@@ -161,7 +162,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple) ...@@ -161,7 +162,7 @@ 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)) if (len > PageGetFreeSpace(pageHeader) && len <= MaxTupleSize)
elog(ERROR, "Tuple is too big: size %d", len); elog(ERROR, "Tuple is too big: size %d", len);
} }
......
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