Configure PostgreSQL Bootstrap Provider

Bootstrap queries from a PostgreSQL snapshot

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: postgres when the source is also kind: postgres.
  • Scope comes from the source configuration (for example tables / tableKeys).

Documentation resources