citusdata / citusdata/citus

`cannot complete operation on a table with identity column` error during `create_distributed_table()` on 12.1

Open
#7,564 7 comments 2 reactions 0 assignees View on GitHub
under-evaluation user_reported
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

Hello, following code triggers an error `SQL Error [0A000]: ERROR: cannot complete operation on a table with identity column`:

```
START TRANSACTION;

CREATE TABLE public.table1 (
id int8 GENERATED ALWAYS AS IDENTITY NOT NULL,
table2_id int8 NOT NULL,
column0 int2 NOT NULL,
column1 timestamptz NOT NULL,
column2 int2 NOT NULL,
column3 int2,
column4 int8,
column5 int8,
column6 int8,
CONSTRAINT table1_pk PRIMARY KEY (id,table2_id),
CONSTRAINT table1_table2_fk FOREIGN KEY (table2_id) REFERENCES public.table2(id)
);
SELECT create_distributed_table('public.table1', 'table2_id');

COMMIT;
```

We are currently running into this issue on two clusters, both in configuration 1 coordinator + 2 workers (separate worker groups, no standbys).
Both are running Citus version 12.1 (verified that all nodes are reporting the same version), one is PG15, the other one is PG16.

Note that this SQL executes without any errors (and seems to achieve the desired state) when testing it locally on a cluster with 1 coordinator and 1 worker (tested both Citus 12.0 and 12.1).

Based on release notes I was under the assumption that this SQL is currently supported in 12.1. Is this correct? If so, let me know what other info could be useful for investigation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.