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

Failed to undistribute table on generated primary key column #7750

Open
zachtrong opened this issue Nov 17, 2024 · 1 comment
Open

Failed to undistribute table on generated primary key column #7750

zachtrong opened this issue Nov 17, 2024 · 1 comment
Labels

Comments

@zachtrong
Copy link

Given following table, Citus is able to create distributed table but failed to revert into undistributed one.

create table gis.address
(
    address_id     bigint generated always as identity (minvalue 1000000000)
        constraint address_pk
            primary key,
    place_geom     geometry(Point, 4326),
    query_name     text,
    place_name     text,
    place_address  text
);

alter table gis.address
    owner to postgres;

create index address_address_id_index
    on gis.address (address_id);

create index address_query_name_index
    on gis.address (query_name);

SELECT create_distributed_table('gis.address', 'address_id'); -- SUCCESS
SELECT undistribute_table('gis.address'); -- FAILED
-- [0A000] ERROR: cannot complete operation on a table with identity column

@onurctirtir
Copy link
Member

Yes, unfortunately this is a known and a bit of annoying limitation of Citus, let me label this as a feature request.

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

No branches or pull requests

2 participants