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 Postgres user exclusively for ClickPipes.
-
Grant read-only access to the schema from which you are replicating tables to
clickpipes_user. Below example shows granting permissions for thepublicschema. If you want to grant access to multiple schemas, you can run these three commands for each schema. -
Grant replication access to this 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 will contain the set of change events generated from the specified tables, and will later be used to ingest the replication stream. -
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.