1. Home
  2. Docs
  3. Requirements and checks
DOCS

Connect a database.

Any PostgreSQL 12 or newer with logical replication turned on. You provide a user that may replicate; Waltail creates its own publication and slot.

What you need

  • PostgreSQL 12 or newer, on any host.
  • wal_level = logical. On a managed host this is a parameter or a project setting; on your own server it is ALTER SYSTEM plus a restart.
  • A user with the REPLICATION attribute (or a superuser, or the host's replication role). The same user must own the tables you stream — or belong to the role that owns them — because creating a publication for a table requires ownership.
  • A free replication slot. max_replication_slots defaults to 10.
  • Network access from Waltail to the database's direct port. A transaction-mode pooler such as PgBouncer cannot carry a replication connection.

The six checks

When you paste a connection string and press Test, the console runs these checks in order. A failed check shows what to change, with SQL you can copy.

CheckPasses whenIf it fails
reachableWaltail can open a connection to the host within 5 secondsOpen the firewall or security group to Waltail, and make sure the host name resolves publicly
credentialsThe user and password are acceptedFix the user or password in the connection string
versionPostgreSQL 12 or newerUpgrade — logical replication needs 12 or newer
wal_levelshow wal_level returns logicalRun ALTER SYSTEM SET wal_level = 'logical'; and restart, or change the setting in your host's parameter group
replication_privilegeThe user has REPLICATION or is a superuserRun ALTER ROLE "<user>" REPLICATION; as a superuser, or use the host's equivalent grant
slot_headroomAt least one replication slot is free (a warning when only one is)Raise max_replication_slots or drop slots you no longer use

Which tables can be streamed

Inserts replicate from any table. Updates and deletes need a way to identify the row: a primary key, or REPLICA IDENTITY set to FULL or to an index. The table picker marks tables that do not qualify and says why.

With the default identity, the old field in update and delete messages holds only the key columns. If your consumer needs the whole previous row, set:

ALTER TABLE public.orders REPLICA IDENTITY FULL;

What Waltail creates on your database

One publication for the selected tables and one logical replication slot (plugin pgoutput), both named pgcdc_<pipeline-name>. Changing the pipeline's tables alters the publication in place. Deleting the pipeline drops both, so nothing is left behind.

Waltail acknowledges each change as soon as it has stored it, so the WAL kept for the slot stays small even when a destination is slow. The console shows slot lag per pipeline so you can keep an eye on it.

Guides by host

Start streaming in minutes.