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>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: lazy detoasting
Date: 2018-05-01 23:56:38
Message-ID: 871sev9bxx.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Peter" == Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:

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

Peter> create table test1 (a int, b text);

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

That value is no good because it's too compressible; it'll be left
inline in the main table rather than being externalized, so the value of
'x' in the DO-block is still self-contained (though it's still toasted
in the sense of being VARATT_IS_EXTENDED).

I tend to use something like this:

insert into test1
values (1, (select string_agg(chr(32+floor(95*random())::integer),'')
from generate_series(1,10000)));

If I do that, I get a different error from your test (whether or not the
vacuum is done):

ERROR: no known snapshots
CONTEXT: PL/pgSQL function inline_code_block line 1 at RAISE

This is another issue that was mentioned before in relation to
procedures.

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yuriy Zhuravlev 2018-05-01 23:57:57 Re: Is a modern build system acceptable for older platforms
Previous Message Tom Lane 2018-05-01 23:39:13 Re: A few warnings on Windows