From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: s.shinderuk@postgrespro.ru
Subject: BUG #17669: Invalid TOAST pointer in PL/pgSQL variable
Date: Thu, 27 Oct 2022 19:45:14 +0000
Message-ID: <17669-2238da15dce5c53c@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 17669
Logged by: Sergey Shinderuk
Email address: s.shinderuk@postgrespro.ru
PostgreSQL version: 15.0
Operating system: Ubuntu 22.04
Description:
Is it a bug or a known limitation?
create table t (a int, b text);
alter table t alter column b set storage external;
insert into t values (1, repeat('a',3000));
create function f() returns text as $$
declare
s text;
begin
select b into s from t where a = 1;
truncate t;
return s;
end;
$$ language plpgsql;
postgres=# select f();
ERROR: missing chunk number 0 for toast value 24727 in pg_toast_24722
If I replace "truncate" with "drop table", then I get:
ERROR: could not open relation with OID 24725
With "delete from t" it just works.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, s.shinderuk@postgrespro.ru
Subject: Re: BUG #17669: Invalid TOAST pointer in PL/pgSQL variable
In-Reply-To: <17669-2238da15dce5c53c@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox