Crunchy Bridge Postgres source setup guide
ClickPipes supports Postgres version 12 and later.
Enable logical replication
Crunchy Bridge comes with logical replication enabled by default. Ensure that the settings below are configured correctly. If not, adjust them accordingly.
Creating ClickPipes user and granting permissions
Connect to your Crunchy Bridge Postgres through the postgres user and run the below commands:
-
Create a dedicated user for ClickPipes:
-
Grant schema-level, read-only access to the user you created in the previous step. The following example shows permissions for the
publicschema. Repeat these commands for each schema containing tables you want to replicate: -
Grant replication privileges to the user:
-
Create a publication with the tables you want to replicate. We strongly recommend only including the tables you need in the publication to avoid performance overhead.
NoteAny table included in the publication must either have a primary key defined or have its replica identity configured to
FULL. See the Postgres FAQs for guidance on scoping.-
To create a publication for specific tables:
-
To create a publication for all tables in a specific schema:
The
clickpipespublication defines the set of tables whose change events will be streamed to ClickPipes. We recommend against usingFOR ALL TABLESunless you intend to replicate every table, as including unnecessary tables increases WAL traffic from Postgres to ClickPipes and reduces overall replication efficiency. -
Safe list ClickPipes IPs
Safelist ClickPipes IPs by adding the Firewall Rules in Crunchy Bridge.
What's next?
You can now create your ClickPipe and start ingesting data from your Postgres instance into ClickHouse Cloud. Make sure to note down the connection details you used while setting up your Postgres instance as you will need them during the ClickPipe creation process.