BUG #4553: HOLD cursors not materializing results fully

From: "Andrew Gierth" <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4553: HOLD cursors not materializing results fully
Date: 2008-11-29 03:07:49
Message-ID: 200811290307.mAT37nZ4047841@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers


The following bug has been logged online:

Bug reference: 4553
Logged by: Andrew Gierth
Email address: andrew(at)tao11(dot)riddles(dot)org(dot)uk
PostgreSQL version: 8.3-8.4
Operating system: all
Description: HOLD cursors not materializing results fully
Details:

(tested on 8.3.5 and HEAD as of a few weeks ago)

The materialization logic for holdable cursors isn't detoasting data prior
to storage in the portal's tuplestore, which leads to problems like this:

postgres=# create table test1 (a text);
CREATE TABLE
postgres=# insert into test1 values
(repeat('daafadslksdfalkeshfalkhfalsdjfhalsjdfhaldjfhalkfhd',10000));
INSERT 0 1
postgres=# declare testcur cursor with hold for select * from test1;
DECLARE CURSOR
postgres=# delete from test1;
DELETE 1
postgres=# vacuum
test1;
VACUUM
postgres=#
fetch first from testcur;
ERROR: missing chunk number 0 for toast value 65571 in pg_toast_65565

Obviously truncate, etc., is affected too.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2008-11-29 21:06:54 Re: BUG #4553: HOLD cursors not materializing results fully
Previous Message John R Pierce 2008-11-28 22:18:42 Re: BUG #4551: Implementation of the "line" type..

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2008-11-29 13:43:23 Re: Re: [COMMITTERS] pgsql: Add support for matching wildcard server certificates to the new
Previous Message Fujii Masao 2008-11-29 01:33:37 Re: Immediate shutdown during recovery