Re: ERROR: no known snapshots

2021-05-12 Thread Tom Lane
reg_pg_stef...@perfexpert.ch writes: > However, I poked around a little bit, and this does not seem to solve > all potential use cases, when I modify the simplified test by deferring > the lookup to be done inside the loop as an extra lookup instead of > doing it directly in the loop (whether th

Re: ERROR: no known snapshots

2021-05-12 Thread reg_pg_stefanz
LOOP; END; $$; \echo test2 DO $$ DECLARE    r record;    t text; BEGIN  FOR r in (SELECT i FROM test2)     LOOP   select txt into t from test2 where i=r.i;   COMMIT;    END LOOP; END; $$; test1 DO test2 psql:snapshot_error.sql:38: ERROR:  no known snapshots CONTEXT:  PL/pgSQL function inline_

Re: ERROR: no known snapshots

2021-05-11 Thread Tom Lane
reg_pg_stef...@perfexpert.ch writes: > it run into an issue with: ERROR:  no known snapshots Hi! This has been reported before, but I'm embarrassed to say that the previous report seems to have fallen between the cracks. I've created a patch [1] that resolves your example as present

ERROR: no known snapshots

2021-05-11 Thread reg_pg_stefanz
Hi it run into an issue with: ERROR:  no known snapshots It seems to me whenever I use a toasted value in a loop in plpgsql code  I get this error. Originally it happened in a procedure with a loop, without a setting of and explicit storage on the column, eg. extended. I can reproduce the