citusdata / citusdata/citus

Error message about distributed deadlock when index name too long

Open
#6,609 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

We hit a similar case as is tested in the regression tests, with an error like:

```
BEGIN;
SELECT count(*) FROM test_index_creation1;
count
---------------------------------------------------------------------
0
(1 row)

CREATE INDEX ix_test_index_creation4
ON test_index_creation1 USING btree
(tenant_id, timeperiod);
ERROR: The index name (test_index_creation1_p2020_09_26_xxxxxx_tenant_id_timeperiod_idx) on a shard is too long and could lead to deadlocks when executed in a transaction block after a parallel query
HINT: Try re-running the transaction with "SET LOCAL citus.multi_shard_modify_mode TO 'sequential';"
```

I get that this behavior is apparently expected, but I couldn't find any information on the "why". How does an index name affect distributed deadlocks?

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.