citusdata / citusdata/citus

Creating partitions with long names within a transaction fails with distributed deadlock

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

Description

This behavior is limited to inside transactions (including when using anonymous functions).

This is most likely related to these fixed issues:

https://github.com/citusdata/citus/issues/1664
https://github.com/citusdata/citus/issues/4739
https://github.com/citusdata/citus/pull/4794

Reproduction script:

```
BEGIN;
create table name_lengths(a int);
insert into name_lengths select i from generate_series(0,10000)i;
ALTER TABLE name_lengths RENAME TO name_len_12345678901234567890123456789012345678901234567890;
select create_distributed_table('name_len_12345678901234567890123456789012345678901234567890', 'a');
COMMIT;
```
Script output:
```
BEGIN
CREATE TABLE
INSERT 0 10001
ALTER TABLE
ERROR: canceling the transaction since it was involved in a distributed deadlock
ROLLBACK
```

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.