Re: [BUGS] Too large tuples corrupting tables - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] Too large tuples corrupting tables
Date
Msg-id 20905.944533121@sss.pgh.pa.us
Whole thread Raw
In response to Too large tuples corrupting tables  (Daniel Stolk <stolkd@email.com>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] renaming index leaves database inconsistent
Next
From: "info@wd-g.com"
Date:
Subject: ÍøÂçµç»°£¬Ãâ·Ñ³¤Í¾£¬¹ú¼Ê¹úÄÚ£¬ÖÕÉíÃâ·Ñ