citusdata / citusdata/citus

Consider adding a check for unlogged / temp tables in citus_rebalance_start() too

Open
#7,790 3 comments 2 reactions 0 assignees View on GitHub
rebalancer usability
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

# Description

If there is `UNLOGGED` table present, logical rebalancing fails with

```
ERROR: cannot add relation "test_table_102008" to publication
DETAIL: This operation is not supported for unlogged tables.
CONTEXT: while executing command on worker-1-1:5432
Citus Background Task Queue Executor: postgres/postgres for (1/1)
```

# Steps to reproduce

- Initialize a cluster with at least one node
- Create a distributed `UNLOGGED` table
```sql
CREATE UNLOGGED TABLE test_table
(
user_id text PRIMARY KEY
);
SELECT create_distributed_table('test_table', 'user_id');
```
- Add new to the cluster
- Start rebalancing
```sql
SELECT citus_rebalance_start(rebalance_strategy := 'by_shard_count');
```
- Observe error in `citus_rebalance_status()`

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.