Postgres
The Postgres integration replicates data from your PostgreSQL database into RevOS. It supports several ways of picking up changes, including Change Data Capture (CDC) with logical replication and replication based on the xmin system column.
Prerequisites
Before you start, make sure you have:
- Access to a PostgreSQL database (version 10 or higher).
- A database user with read-only privileges and replication rights.
You can't build a table directly from an integration. Once the integration has synced, first create a semantic model based on its data — then you can build tables.
Create a read-only user
We recommend a dedicated read-only user for RevOS. Run the following SQL:
CREATE USER <username> PASSWORD '<password>';
GRANT CONNECT ON DATABASE <database_name> TO <username>;
GRANT USAGE ON SCHEMA <schema_name> TO <username>;
GRANT SELECT ON ALL TABLES IN SCHEMA <schema_name> TO <username>;
ALTER DEFAULT PRIVILEGES IN SCHEMA <schema_name> GRANT SELECT ON TABLES TO <username>;
Replace <username>, <password>, <database_name>, and <schema_name> with your own values.
Configure the integration in RevOS
In RevOS, open Integrations, click Add Data Source and select Postgres (see Integrations Page Overview). Then fill in:
-
Connection details:
- Name: a descriptive name for the integration.
- Host: the address of your PostgreSQL server.
- Port:
5432by default. - Database Name: the name of the PostgreSQL database.
- Username: the user with read access.
- Password: the password for that user.
- Schemas: the schemas to replicate. Leave empty to replicate all schemas the user can access.

-
Optional settings:
- JDBC URL Parameters: extra connection options, as
key=valuepairs separated by&. - SSL Mode: how the connection is encrypted (
disable,allow,prefer,require,verify-ca,verify-full).

- JDBC URL Parameters: extra connection options, as
-
Update method:
- Read Changes using Write-Ahead Log (CDC) (recommended): continuously replicates changes in the database. Requires a replication slot and a publication — see Set up Change Data Capture.
- Detect Changes with Xmin System Column: uses the
xminsystem column — a good fit for small databases or when logical replication isn't available. - Scan Changes with User Defined Cursor: picks up new and updated rows using a column you choose.

With CDC, also fill in:
Field What to enter Plugin pgoutputReplication Slot The replication slot you created (e.g. revos_slot)Publication The publication you created (e.g. revos_pub)Initial Waiting Time 300seconds; increase it if your first sync is very largeQueue Size 10000; raise it for databases with a sustained high volume of changes -
Click Connect. RevOS checks the credentials, that it can reach the database and, with CDC, that the replication slot and publication exist. If the check succeeds, the integration becomes active and RevOS starts the first sync.
Set up Change Data Capture (CDC)
RevOS does not create the replication slot or the publication — both must exist before you connect. To use CDC with logical replication:
-
Enable logical replication. In
postgresql.conf, setwal_leveltological, and make sure bothmax_replication_slotsandmax_wal_sendersare greater than zero. Restart the server, then check the setting:SHOW wal_level; -- should output "logical"On a managed database (such as AlloyDB) you set
wal_levelthrough the provider's database flags instead — see AlloyDB for PostgreSQL. -
Create a replication slot and a publication with any SQL client:
-- replication slotSELECT pg_create_logical_replication_slot('revos_slot', 'pgoutput');-- publication (all tables)CREATE PUBLICATION revos_pub FOR ALL TABLES;You can use other names (lowercase letters, digits and underscores) — enter the same names in RevOS.
-
Give the user replication rights if it doesn't have them yet (needs admin privileges):
ALTER ROLE <username> WITH REPLICATION;
For more on these settings, see the PostgreSQL documentation on logical replication.
Connect through an SSH tunnel
If RevOS can't reach the database directly (e.g. it has no public IP), connect through an SSH tunnel:
- In the integration form, choose SSH Key Authentication or SSH Password Authentication.
- Provide the SSH host, port (usually
22), and the tunnel user's credentials.
Before you fall back to SSH, check that your firewall allows inbound traffic on the database port from the RevOS IP addresses. Only use SSH if a direct, encrypted connection is impossible.
Common issues and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
connection refused | Wrong host/port or firewall | Double-check the host, open the database port, or connect through an SSH tunnel. |
FATAL: password authentication failed | Wrong user or password | Re-enter the credentials; test them with psql. |
ERROR: logical decoding requires wal_level >= logical | Logical replication not enabled | Set wal_level to logical (see CDC setup), then restart the server. |
ERROR: replication slot "revos_slot" does not exist | Slot missing or name mismatch | Check the name (pg_replication_slots) or create the slot. |
| TLS handshake errors | SSL mode mismatch | Use require or verify-full; make sure CA certificates are trusted. |
Useful queries while debugging:
-- List replication slots
SELECT slot_name, active FROM pg_replication_slots;
-- Drop a stale slot
SELECT pg_drop_replication_slot('revos_slot');
Limitations and recommendations
- PostgreSQL version: version 10 and above is supported. CDC is recommended for version 10+.
- Performance: replication speed depends on your server configuration and data volume. Test before relying on it in production.
- Security: when using SSL, prefer the
verify-caorverify-fullmodes for secure data transfer.