reading row in backend - Mailing list pgsql-hackers

From Patrick Welche
Subject reading row in backend
Date
Msg-id 20000515232957.B22468@quartz.newn.cam.ac.uk
Whole thread Raw
Responses Re: reading row in backend
List pgsql-hackers
I'm just upgrading a database to v7.0, but I am rather unlucky in that in
each of 2 large (ca. 20000 rows) tables, 1 row is too big eg:

ERROR:  copy: line 57552, Tuple is too big: size 8152, max size 8140

Now, it would help me if I could actually get a clue as to which row this
is. The error message comes from hio.c:118 at which point one has a
HeapTuple. Is there a way of extracting a piece of the row in the tuple to
be able to identify it?

It seems that a HeapTuple starts with a HeapTupleHeader, so the data I
suppose starts at tuple->t_data[sizeof(HeapTupleHeaderData)] and goes on for
tuple->t_len-sizeof(HeapTupleHeaderData) bytes, but how is it represented?

Any pointers appreciated! (These are huge COPY statements, so after the
error I'm left with an empty table - I'd just like to chop the 12 bytes
off!)

Cheers,

Patrick


pgsql-hackers by date:

Previous
From: "Mikheev, Vadim"
Date:
Subject: RE: Proposal: replace no-overwrite with Berkeley DB
Next
From: Tom Lane
Date:
Subject: Re: reading row in backend