Skip to main content
PostgreSQL is a powerful open-source relational database. MantrixFlow can sync data from any PostgreSQL instance, including self-hosted servers and managed services such as Supabase, Railway, Render, Neon, and AWS RDS.

Prerequisites

You need a PostgreSQL database and a user with read access to the tables you want to sync. For CDC, you need database administrator access to enable logical replication.

Connection Setup

1

1. Connection Name

Enter a friendly name (e.g. “Production PostgreSQL”) to identify this connection.
2

2. Host

Enter the database server hostname or IP address. For cloud providers, find this in your database dashboard (e.g. Supabase Project Settings, Neon connection string).
3

3. Port

Enter the port. Default is 5432. Most managed PostgreSQL services use 5432.
4

4. Database

Enter the database name. For Supabase, this is usually postgres. For Neon, it is shown in the connection string.
5

5. Username and Password

Enter the username and password for the database user. Create a dedicated read-only user for MantrixFlow (see below).
6

6. Enable SSL

For cloud databases, enable SSL. For local development, you may disable it.

Create a Read-Only User

Run the following SQL as a superuser to create a dedicated user for MantrixFlow:
CREATE USER mantrixflow_read WITH PASSWORD 'your_secure_password';

-- Grant connect
GRANT CONNECT ON DATABASE your_database TO mantrixflow_read;

-- Grant usage on schema
GRANT USAGE ON SCHEMA public TO mantrixflow_read;

-- Grant select on all tables (adjust schema/table names as needed)
GRANT SELECT ON ALL TABLES IN SCHEMA public TO mantrixflow_read;

-- For incremental sync, ensure the user can read the cursor column
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO mantrixflow_read;

Available Streams

Streams correspond to database tables. When you create a pipeline, you select which tables to sync. MantrixFlow discovers the schema from the database and lets you choose streams per pipeline.

Supported Sync Modes

  • Full sync — Reads every row on every run. Supported for all tables.
  • Incremental sync — Uses a cursor column (e.g. updated_at, created_at) to read only new or updated rows. Choose a column that increases monotonically.

CDC Setup

Database Admin RequiredCDC requires database administrator access to enable logical replication and create a publication.
See the CDC Setup for PostgreSQL page for the exact commands to enable logical replication, set wal_level to logical, create a replication slot, create a publication, and grant replication permissions.