citusdata / citusdata/citus

Creating constraints backed by indexes on long named partitions deadlocks

Open
#5,363 1 comment 1 reaction 0 assignees View on GitHub
bug tool_reported
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

```SQL
CREATE TABLE dist_partitioned_table (dist_col int, another_col int, partition_col timestamp) PARTITION BY RANGE (partition_col);
SELECT create_distributed_table('dist_partitioned_table', 'dist_col');
CREATE TABLE partition_table_with_very_long_name PARTITION OF dist_partitioned_table FOR VALUES FROM ('2018-01-01') TO ('2019-01-01');
SET citus.force_max_query_parallelization TO ON;
ALTER TABLE dist_partitioned_table ADD CONSTRAINT constraint5 UNIQUE (dist_col, partition_col);
ERROR: canceling the transaction since it was involved in a distributed deadlock

```

I guess we need something like https://github.com/citusdata/citus/pull/4794/files or https://github.com/citusdata/citus/pull/4709/files, maybe we can simply use one of those functions

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.