Re: [BUGS] Too large tuples corrupting tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Stolk <stolkd(at)email(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] Too large tuples corrupting tables
Date: 1999-12-07 02:18:41
Message-ID: 20905.944533121@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Daniel Stolk <stolkd(at)email(dot)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

Browse pgsql-bugs by date

  From Date Subject
Next Message info@wd-g.com 1999-12-07 11:11:07
Previous Message Tom Lane 1999-12-07 01:59:13 Re: [BUGS] renaming index leaves database inconsistent