Page
Storage
Database Choice
Myria v1 is intentionally PostgreSQL-native.
The service uses PostgreSQL for:
- append-only event storage
- snapshot registry
- topic metadata
- snapshot-scoped node membership
- node edges
- node refs
Core Tables
events
Stores the canonical event log.
Important columns:
event_seqevent_idsource_event_keytimestampchannelparticipantsinternalpayloadtopic_hintscreated_at
Important key:
- partial unique index on
(channel, source_event_key)whensource_event_keyis not null
topics
Stores exact derived topic metadata.
Important columns:
topic_idcontext_idparticipantsstatelabelparent_topic_idcreated_atlast_active_at
snapshots
Stores snapshot metadata:
snapshot_idparent_idevent_max_seqstatus- builder version fields
created_at
snapshot_registry
Stores the current active snapshot pointer.
nodes
Stores canonical node bodies:
node_idnode_typeis_leafparticipantssummarymetadatacreated_at
snapshot_nodes
Maps a snapshot to the nodes that belong to it.
node_children
Stores snapshot-scoped parent/child edges with explicit position ordering.
node_refs
Stores snapshot-scoped leaf-node refs back to raw events.
Only leaf nodes appear here.
Why Snapshot Membership Is Split Out
Node identity is content-addressed and excludes tree pointers, so Myria stores:
- canonical node bodies in
nodes - snapshot membership in
snapshot_nodes - snapshot-specific structure in
node_children - snapshot-specific refs in
node_refs
This lets the service preserve stable node identity while rebuilding tree structure across snapshots.