Re: lazy detoasting - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: lazy detoasting
Date
Msg-id 871sev9bxx.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: lazy detoasting  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: lazy detoasting
Re: lazy detoasting
List pgsql-hackers
>>>>> "Peter" == Peter Eisentraut <peter.eisentraut@2ndquadrant.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)


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: A few warnings on Windows
Next
From: Yuriy Zhuravlev
Date:
Subject: Re: Is a modern build system acceptable for older platforms