Configure PostgreSQL Bootstrap Provider
Bootstrap queries from a PostgreSQL snapshot
less than a minute
The PostgreSQL bootstrap provider loads initial state from a PostgreSQL database so queries start with a complete snapshot before streaming begins.
When to use PostgreSQL bootstrap
- You need historical/current state from PostgreSQL when a query starts.
- Your query depends on existing rows (aggregations, joins, thresholds).
- You want snapshot + WAL streaming from the same database.
Prerequisites
- Use with a PostgreSQL source (
sources[].kind: postgres). - The PostgreSQL source must be able to connect and read the configured tables.
Quick example (Drasi Server config)
In Drasi Server config, bootstrap provider keys are camelCase, and the discriminator field is bootstrapProvider.kind.
sources:
- kind: postgres
id: orders-db
autoStart: true
host: ${PGHOST:-localhost}
port: ${PGPORT:-5432}
database: ${PGDATABASE:-mydb}
user: ${PGUSER:-drasi_user}
password: ${PGPASSWORD}
publicationName: drasi_publication
slotName: drasi_slot
# Optional: used for bootstrap scope and key overrides
tables:
- public.orders
- public.customers
bootstrapProvider:
kind: postgres
Configuration reference
postgres accepts no additional fields.
| Field | Type | Required | Description |
|---|---|---|---|
kind |
string | Yes | Must be postgres |
Notes
- Drasi Server only allows
kind: postgreswhen the source is alsokind: postgres. - Scope comes from the source configuration (for example
tables/tableKeys).
Documentation resources
PostgreSQL Bootstrap README
Implementation notes and behavior details
drasi-bootstrap-postgres on crates.io
Package info and release history
Feedback
Was this page helpful?
Glad to hear it! Please tell us what you found helpful.
Sorry to hear that. Please tell us how we can improve.