Skip to content

docs(database): define Citus table groups#370

Merged
KurodaKayn merged 2 commits into
mainfrom
docs/citus-table-design
Jul 3, 2026
Merged

docs(database): define Citus table groups#370
KurodaKayn merged 2 commits into
mainfrom
docs/citus-table-design

Conversation

@KurodaKayn

Copy link
Copy Markdown
Owner

Change Description

  • Marks the Phase 5 Citus table-group design item complete and raises the database plan progress to about 80%.
  • Adds script/db/citus_table_groups.yml with the tenant_workspace colocated group, reference-table candidates, control-domain exclusions, and deferred colocation gaps.
  • Documents the initial Citus validation DDL shape while leaving unique/FK review and worker payload routing as remaining Phase 5 work.

Implementation Approach

  • Keeps tenant-owned tables on the workspace UUID value, using workspaces.id for the root table and workspace_id for child tables.
  • Keeps platform account, browser session, outbox, and idempotency-claim tables outside the first distributed group until their ownership/routing changes land.
  • Adds a Ruby manifest check that validates table classifications, distribution columns, reference DDL markers, and required Phase 5 anchor tables.

Testing

  • ruby script/db/test_citus_table_groups.rb (pass)
  • Standard product CI lanes are not selected by the current script/ci/select-area.sh patterns for documentation plus script/db changes.

Phase 5 needs a concrete target for distributed and reference tables before constraint work continues.

Add a machine-readable table-group manifest and record the tenant_workspace colocation design in the database plan.

The remaining Phase 5 work is narrowed to constraint review and workspace-aware worker payloads.
The Citus table design should fail fast when the manifest loses required tenant tables or classifications.

Add a Ruby manifest test and wire it into the database plan as a verification entry point.

The check keeps Phase 5 table grouping reviewable without a live Citus validation cluster.
@KurodaKayn KurodaKayn merged commit d9b6829 into main Jul 3, 2026
11 checks passed
@KurodaKayn KurodaKayn deleted the docs/citus-table-design branch July 3, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant