citusdata / citusdata/citus

pg_dist_shard_placement is empty in follower clusters

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

Description

`pg_dist_shard_placement` is a view that's currently defined as:
```
CREATE OR REPLACE VIEW pg_catalog.pg_dist_shard_placement AS
SELECT shardid, shardstate, shardlength, nodename, nodeport, placementid
FROM pg_dist_placement placement INNER JOIN pg_dist_node node ON (
placement.groupid = node.groupid AND node.noderole = 'primary'
);
```

but in a follower clusters all nodes have noderole 'secondary', meaning `pg_dist_shard_placement` is empty.

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.