Skip to main content
Database Admin RequiredYou need superuser or replication privileges to perform these steps.
Follow these steps to enable CDC for PostgreSQL.
1

1. Set wal_level to logical

Edit postgresql.conf or use ALTER SYSTEM:
ALTER SYSTEM SET wal_level = 'logical';
Restart PostgreSQL for the change to take effect.
2

2. Create a replication slot (optional)

The connector may create the slot automatically. If you need to create it manually:
SELECT * FROM pg_create_logical_replication_slot('mantrixflow_slot', 'pgoutput');
3

3. Create a publication

Create a publication for the tables you want to sync:
CREATE PUBLICATION mantrixflow_pub FOR TABLE schema1.table1, schema1.table2;
Or for all tables in a schema:
CREATE PUBLICATION mantrixflow_pub FOR ALL TABLES IN SCHEMA public;
4

4. Grant replication permissions

The user must have REPLICATION privilege:
ALTER USER mantrixflow_read REPLICATION;
Or create a dedicated replication user:
CREATE USER mantrixflow_repl WITH REPLICATION PASSWORD 'your_password';
GRANT SELECT ON ALL TABLES IN SCHEMA public TO mantrixflow_repl;
After completing these steps, configure the PostgreSQL source connection with the publication name and run a pipeline with CDC sync mode.