nabla
nabla · Asynchronous incremental materialized views with delta subscriptions
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101969 | nabla | nabla | 0.1.0 | FEAT | AGPL-3.0-or-later | Rust |
PostgreSQL · 17
Usage
Sources:
nabla maintains views asynchronously from logical WAL and exposes ordered deltas to subscribers. The reviewed 0.1.0 source targets PostgreSQL 17 and is experimental; view contents can lag committed writes.
Enablement
Configure wal_level = logical, add nabla to shared_preload_libraries, set nabla.database to an existing database, and reserve replication slots. Restart the server, then install as a superuser. The worker maintains views in one configured database.
Subscriptions and Recovery
nabla.current_seq gives a delta cursor; nabla.changes reads changes after a sequence within an epoch. Notifications are wakeups, not a durable delivery mechanism. A subscriber must use the snapshot/cursor protocol and re-snapshot when the epoch changes or retained history is unavailable. nabla.refresh rebuilds a view; nabla.drop_view removes its registration.
Use only query forms accepted by the pinned source and monitor worker errors and view state. The simple filtered and grouped workflow above avoids more complex join restrictions. Replication slots can retain substantial WAL; exceeding the configured retention boundary can make a view stale and require rebuilding. Base-row replica identity must provide the old values needed by incremental maintenance.