Daniel Stolk <stolkd@email.com> writes:
> I seem to have a problem here. When I try to insert a tuple that is
> larger than 8192 bytes, I get an error message saying that the tuple
> is too large. Ok, that's fine, since the BLCK_SIZE is 8192. But the
> problem is that the table seems to become corrupted. After I do this
> insert statement I went to psql and did a select on the table (which
> doesn't have any tuples in it).
The table was initially empty, you say? I think I just fixed that bug
en passant a day or two ago: it looked like the oversize-tuple test
was applied after appending a page to the empty relation, but before
writing out a valid page header to that page :-(. Problem didn't occur
as long as there was already at least one page in the relation.
If anyone wants to backpatch this fix into 6.5.*, it's in
RelationPutHeapTupleAtEnd() in src/backend/access/heap/hio.c.
I just moved the test for oversize tuple up to the top.
regards, tom lane