Re: lazy detoasting

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Chapman Flack <chap(at)anastigmatix(dot)net>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: lazy detoasting
Date: 2018-04-25 11:50:50
Message-ID: 877eovbjc3.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Andrew" == Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:

>>>>> "Peter" == Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
>> On 4/11/18 11:33, Tom Lane wrote:
>>> (Wanders away wondering what Peter has done about toasted parameter
>>> values for procedures in general ...)

Peter> I'm not sure. How can a procedure have a toasted parameter value?

Andrew> do $$ declare a text; begin select f1.a into a from f1; call p1(a); end; $$;

And behold:

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)

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2018-04-25 11:54:31 Re: unused_oids script is broken with bsd sed
Previous Message Andrew Gierth 2018-04-25 11:35:24 Re: lazy detoasting