Re: lazy detoasting

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: lazy detoasting
Дата
Msg-id 313e030c-392b-53cd-1546-522bb7cb9f57@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: lazy detoasting  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Ответы Re: lazy detoasting  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Is there a memory leak in commit 8561e48?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: "could not reattach to shared memory" on buildfarm member dory