The import contract — exactly what an import reproduces

An Adjoint golden is built by a logical import: we stream a dump of one database from your source into a fresh Postgres instance, then snapshot the result. A golden is therefore a faithful copy of your database's schema and data — not a byte-for-byte replica of your production server. This page is the precise contract: what carries over, what doesn't, and what fails loudly.

The mechanism

An import runs two Kubernetes Jobs in the adjoint-import namespace of your data-plane cluster:

  1. Probe — connects to the source and measures pg_database_size(current_database()) for fail-fast sizing checks.
  2. Load — streams, with no intermediate file:
pg_dump --format=custom --no-owner --no-privileges  (from your source)
  | pg_restore --no-owner --no-privileges --no-comments --role=app

The restore target is an ephemeral, single-instance Postgres cluster running the stock CloudNativePG image for the --pg-major you specify. When the restore completes, Adjoint takes a storage snapshot of that instance's volume — that snapshot is the golden version. Clones are copy-on-write children of it.

What carries over

What does not carry over

Versions

Fidelity and validation

The import's success signal is the clean exit of the pg_dump | pg_restore pipeline — Postgres's own tools, in their standard streaming configuration. Adjoint does not currently run independent post-import validation (row-count or checksum comparison against the source). If your acceptance process needs that, compare source and clone directly — a clone of the new golden is the natural place to run it.

The storage lifecycle, end to end

Everything lives on a single FSx for OpenZFS filesystem in your AWS account — there is no EBS anywhere in the import or clone path:

your source (e.g. RDS Postgres)
  │  pg_dump | pg_restore  (streamed, no intermediate file)
  ▼
ephemeral import Postgres
  └── its data volume = an FSx OpenZFS child volume        (import PVC)
        │  storage snapshot, taken while quiesced
        ▼
      FSx OpenZFS snapshot  ═══ the golden version          (immutable)
        │  copy-on-write clone, one per instance
        ▼
      FSx OpenZFS clone volumes                             (your sandboxes)

Two things are deliberately retained after an import completes and its ephemeral cluster is torn down:

Both are cleaned up when the golden itself is deleted (adj catalog delete), and the whole filesystem — volumes, snapshots, clones — is destroyed together at adj cluster deprovision.

What this means for how you use goldens

A golden behaves like your database for functional work: query correctness, schema migrations, data-dependent bugs, integration tests, and realistic volumes and distributions. It is not a performance replica of your production server — different compute, storage, cache, and configuration mean latency and throughput numbers don't transfer (see Benchmarks and methodology for what the clone substrate does deliver).

Source credentials, for the record: the username and password you supply at adj source create are written directly into your data-plane cluster as a Kubernetes Secret — they never transit or persist in Adjoint's control plane. See Goldens and imports.