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

with as select insert - queries use incorrect sequence #7784

Open
cimerren opened this issue Dec 9, 2024 · 0 comments
Open

with as select insert - queries use incorrect sequence #7784

cimerren opened this issue Dec 9, 2024 · 0 comments

Comments

@cimerren
Copy link

cimerren commented Dec 9, 2024

Hi, we are using citus in schema based sharding and are experiencing strange behavior when running the following query:

set citus.enable_schema_based_sharding to on;

create schema citus_test;

SET search_path = citus_test, public;
create table version (
	id bigserial not null,
	description varchar(255),
	primary key (id)
);

insert into version (description) values ('Version 1');

with v as (
	select * from version where description = 'Version 1'
)
insert into 
version (description) 
select description
from v;

select * from citus_test.version;

Expected:

id description
1 Version 1
2 Version 1

Actual:

id description
1 Version 1
562949953421313 Version 1

I found the following issue: 6798, and from the values it looks like it could be related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant