DB
Concepts

PSI — Predicate Subscription Index

The core stream:key routing primitive shared by live queries, maintainers, transforms, and schema/cache invalidation.

PSI stands for Predicate Subscription Index. It routes committed changes to the in-process components that need them without broadcasting every event or polling storage.

Core contract

PSI is a core engine primitive, not a memory-service implementation detail. Routing and handler chaining match stream:key pairs, not stream names alone.

A subscription contains a source identity, key route, and residual predicate. The exact route narrows delivery; the residual predicate is evaluated after delivery when it cannot be represented by the route key.

Consumers include:

  • streaming query channels;
  • table and index maintainers;
  • materialized views and continuous transforms;
  • attribute projection maintainers;
  • schema and cache invalidation listeners;
  • internal system-table subscribers.

Publication boundary

PSI receives only committed changes. Durable DML publishes after its journal commit succeeds; a rolled-back statement emits no PSI event. Source generation is part of lifecycle identity, so dropping and recreating a relation cannot reattach old handlers to new state.

Delivery lanes

The current implementation uses asynchronous, bounded lanes for system, maintenance, and client work. Each exact source owns its event-ring capacity; unrelated sources do not share a ring slot namespace.

Backlog and delivery health are observable through system.subscriptions and system.metrics. Operators can tune worker counts, ring capacity, and exact source partition admission, but those are server-level controls, not SQL semantics.

What PSI does not provide

PSI does not turn the single-node engine into a replicated log or external message broker. It does not provide cross-node failover, durable client offsets, or a reconnect SLA. Those capabilities are unsupported or design-only in the current profile.

PSI does provide one shared local routing contract so indexes, live reads, and derived state do not evolve separate delivery semantics.

On this page