Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/store-postgres / PostgresStoreOptions

Interface: PostgresStoreOptions

Defined in: packages/store-postgres/src/store.ts:107

@rulvar/store-postgres: PostgresStore implementing JournalStore and LeasableStore with fencing epochs over node-postgres, for multi-process and multi-host deployments (RV-214). Payloads stay opaque TEXT (A4); every run-scoped mutation serializes on a per-run advisory transaction lock so the fence check and the guarded mutation commit as one unit across hosts. Beside it, PostgresQuotaLimiter (RV410) is the multi-host reference of the core QuotaLimiter SPI: one database, one schema, one global provider quota, admission serialized on a schema-wide advisory lock.

Properties

PropertyTypeDescriptionDefined in
max?numberPool size ceiling; default 10.packages/store-postgres/src/store.ts:124
now?() => numberInjectable clock for lease-expiry tests.packages/store-postgres/src/store.ts:126
schema?stringSchema holding this store's tables; default public. A non-public schema is created on boot (CREATE SCHEMA IF NOT EXISTS), which also gives tests and multi-tenant hosts cheap isolation. Must be a plain SQL identifier.packages/store-postgres/src/store.ts:120
ttlMs?numberLease ttl; default the Appendix A interim reference (60000 ms).packages/store-postgres/src/store.ts:122
urlstringA postgres connection string (postgres://user:password@host:port/database). Every coordinating process and host points at the same database and schema.packages/store-postgres/src/store.ts:113