Skip to content
Jason Petersen edited this page Apr 4, 2014 · 2 revisions

Brainstorming scratchpad. Takeaway: going with FDW APIs, using postgres_fdw's connection.c and deparse.c as inspiration.

Features

Comprehensive list of desired features for each version.

First Version

First internal release.

  • Single-row inserts through master with replication
  • Naïve (UNION ALL-style) SELECT queries through master (no JOIN, sub-SELECT, or common table expression support)
  • Fall-through to optimized (CitusDB) logic for existing customers
  • Shard pruning for absolute equality predicates in SELECTs
  • Hash partitioning across a fixed number of partitions using a single column's value
  • Single algorithm for task assignment (random or first-replica)
  • Strict consistency across replicats (users must intervene if a node becomes unhealthy)
  • One-shot schema propagation (up-front definition of tables)
  • Seamless upgrade to CitusDB from PostgreSQL for extension users

Future Versions

  • Failure modes
  • Citus modifications
  • UPDATE/DELETE
  • Range partitions
  • Schema modification
  • Trans-table partition schemes

Trouble Spots

Possible problems.

  • Collations
  • Domains
  • Custom types
  • Inheritance
  • Exclusion constraints (unless on hash key)
  • Foreign keys (unless both tables use same hash scheme)
  • Uniqueness constraints (unless on hash key)
  • Oids
  • Sequences
  • Storage parameters

Takeaways

More iterative reviews; frequently/often.

Plan discrete, compilable, runnable chunks.