Re: lazy detoasting

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: lazy detoasting
Date: 2018-05-01 14:04:38
Message-ID: 313e030c-392b-53cd-1546-522bb7cb9f57@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4/25/18 07:50, Andrew Gierth wrote:
> do $$
> declare a text;
> begin
> select f1.a into a from f1;
> delete from f1;
> commit;
> perform pg_sleep(10); -- vacuum f1 in another session while it sleeps
> call p1(a);
> end; $$;
> INFO: a: (t,t,f,"missing chunk number 0",,)
>
> (p1 in this case is using toast_item_detail() from the module I just put
> up at https://github.com/RhodiumToad/pg-toastutils to examine the value)

Is there a more self-contained way to test this? I have been trying
with something like

create table test1 (a int, b text);

insert into test1 values (1, repeat('foo', 2000));

do $$
declare
x text;
begin
select test1.b into x from test1;
delete from test1;
commit;
perform pg_sleep(10); -- vacuum test1 in another session
raise notice 'x = %', x; -- should fail
end;
$$;

But it doesn't fail.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-05-01 15:31:50 Re: "could not reattach to shared memory" on buildfarm member dory
Previous Message Michael Paquier 2018-05-01 12:10:00 Re: Is there a memory leak in commit 8561e48?