Skip to main content
A connector links Ardent to one Postgres server. Once it’s ready, every branch you create comes from that source.
Currently supported connector type: postgresql.

ardent connector preflight

Check a database before connecting it. Preflight creates nothing and stores no credentials:
It answers one question: can Ardent safely branch this database? It checks:
  • Connection — the host is reachable and the credentials work
  • Permissions — the role can read the tables you want to replicate
  • Replication settingswal_level, free replication slots, WAL senders, and the wal2json plugin
When something is missing, it tells you the exact fix — and prints a ready-to-run SQL grant script when grants are the problem.
Preflight exits 0 when everything passes and 2 when it doesn’t, so you can use it in scripts.

ardent connector create

When preflight passes, connect the database:
Wrap the URL in single quotes. Passwords often contain characters your shell would otherwise interpret. The last three are different ways to answer replica identity decisions — use at most one. With none, the CLI walks you through the choices interactively.
First-time setup copies your data, so it can take minutes to hours depending on database size, write rate, and network speed. After that, branches are created in seconds regardless of size.

Replica identity decisions

Some tables have no primary key or valid unique index, so Postgres can’t tell which row an UPDATE or DELETE touched. When Ardent finds tables like this, the CLI asks what to do with each one. In scripts (no terminal), it exits with code 1 instead of guessing — pass one of the three flags above. You can also answer ahead of time: --replica-identity-decisions takes a JSON file mapping each table to a choice. Most databases have keys on every table and never hit this.
A valid unique index means unique, NOT NULL on every column, non-partial, and non-deferrable. Tables without a primary key or an index like that need a decision:
The file must cover every listed table. With --accept-replica-identity-defaults, undecided tables are excluded.
REPLICA IDENTITY FULL makes UPDATE and DELETE write more to your database’s WAL. Choose it deliberately. Ardent never changes replica identity on your source — when a change is needed, it prints the SQL for you to run.

ardent connector list

Your active connector is green and marked *. Status icons: Warnings appear under the connector, with a count next to the name. A [delete locked] marker means deletion is locked (see below). In CI, add --fail-on-warnings to exit with code 2 when any connector has warnings.

ardent connector status

Show one connector’s health and setup progress:
validating means source checks or setup are running right now.

ardent connector switch

Change the active connector without changing projects:

ardent connector retry-setup

Finish or repair setup without deleting the connector. Your credentials and configuration are kept.
What happens depends on the connector’s state:
  • Checks are stale or failed — the CLI re-checks the source first, then runs setup.
  • Already healthy — nothing to do; the CLI says so and exits.
  • Setup already running — safe to run anyway; it joins the running setup instead of starting another. If that setup still needs replica identity decisions, the CLI exits with code 1 — decisions can’t change mid-setup. Wait for it to finish, then retry.
If the original setup needed replica identity decisions, pass the same file or flag again:

ardent connector update

Change connector configuration. One setting today: which source extensions to leave out of new branches.
Pass an empty string to clear the list:

ardent connector delete

By default, Ardent waits for in-progress replication to finish so no changes are lost. --force skips the wait and abandons those changes. Two things can stop a delete:
  • Deletion is locked — someone ran connector lock on it. Unlock first.
  • A branch has un-replicated changes — wait, or re-run with --force.

Locks and quarantines

You’ll rarely need these two, but you should know they exist.
While locked, connector delete refuses and tells you to unlock first. Locked connectors show [delete locked] in connector list.
If part of a connector’s replication keeps crashing, Ardent pauses (quarantines) it to protect your source. Quarantines don’t show in connector status — list them directly:
Each entry shows what was paused, why, when, and the exact release command:
Fix the underlying cause before releasing, or it will likely quarantine again.