Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 通过SPI接口执行commit/rollback后,继续执行语句会报错:ERROR: no known snapshots #510

Closed
Howard229 opened this issue Jul 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Howard229
Copy link

Describe the bug
通过SPI接口/plpgsql执行commit/rollback后,继续执行语句会报错:ERROR: no known snapshots

To Reproduce
问题复现用例:

CREATE TABLE test1 (a int, b text);
ALTER TABLE test1 ALTER COLUMN b SET STORAGE EXTERNAL;
INSERT INTO test1 VALUES (1, repeat('foo', 2000));
insert into test1 values (2, repeat('bar', 3000));
insert into test1 values (3, repeat('baz', 4000));

do $$
  declare
    r record;
    t text;
  begin
    for r in select test1.a from test1 loop
      commit;
      select b into t from test1 where a = r.a;
      raise notice 'length(t) = %', length(t);
    end loop;
  end;
$$;

Expected behavior
A clear and concise description of what you expected to happen.
预期是正常执行不报错,并且通过notice日志打印3条数据的长度

length(t) = 6000
length(t) = 9000
length(t) = 12000

Screenshots
If applicable, add screenshots to help explain your problem.
image

Environment (please complete the following information):

  • OS: [CentOS 8]
  • Version [POLARDB_11_STABLE 1c3c67b]

Additional context
Add any other context about the problem here.
image

@Howard229 Howard229 added the bug Something isn't working label Jul 7, 2024
@polardb-bot
Copy link

polardb-bot bot commented Jul 7, 2024

Hi @Howard229 ~ Thanks for opening this issue! 🎉

Please make sure you have provided enough information for subsequent discussion.

We will get back to you as soon as possible. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant