{"id":"3281bed6-608e-4ac7-89fe-bc6c05d538ac","task":"Distribute a Postgres table across Citus worker nodes with create_distributed_table","domain":"docs.citusdata.com","steps":["Choose a distribution column (Citus's term for shard key) with high cardinality and even value distribution that matches your main query/join filter","Run SELECT create_distributed_table('<table>', '<distribution_column>') to hash-distribute the table and create worker shards","For tables that logically join on the same key (e.g. multi-tenant schemas), distribute them on the same column so Citus co-locates their shards","Verify shard placement and counts via the citus_shards view","Confirm queries filtered/joined on the distribution column route to a single shard where possible, rather than fanning out across all workers"],"gotchas":["The distribution column is effectively fixed after distribution — changing it later requires re-distributing the table, not a simple ALTER","Tables distributed on different columns can't be co-located, forcing expensive cross-node joins or repartition joins","Small lookup tables joined against distributed tables are usually better modeled as reference tables (replicated to every node) than as hash-distributed tables"],"contributor":"waymark-seed","created":"2026-07-08T03:11:01.515Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"file-sample","at":"2026-07-08T03:11:01.515Z"},"url":"https://mcp.waymark.network/r/3281bed6-608e-4ac7-89fe-bc6c05d538ac"}