Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
If you use one of the supported providers (in the sidebar), please refer to the specific guide for that provider.
Enable logical replication
-
To enable replication on your Postgres instance, we need to make sure that the following settings are set:
To check the same, you can run the following SQL command:The output should be
logical. If not, run: -
Additionally, the following settings are recommended to be set on the Postgres instance:
To check the same, you can run the following SQL commands:If the values don’t match the recommended values, you can run the following SQL commands to set them:
- If you have made any changes to the configuration as mentioned above, you NEED to RESTART the Postgres instance for the changes to take effect.
Creating a user with permissions and publication
Connect to your Postgres instance as an admin user and execute the following 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.
-
To create a publication for specific tables:
-
To create a publication for all tables in a specific schema:
clickpipes publication will contain the set of change events generated from the specified tables, and will later be used to ingest the replication stream.
Enabling connections in pg_hba.conf to the ClickPipes User
If you’re self serving, you need to allow connections to the ClickPipes user from the ClickPipes IP addresses by following the below steps. If you’re using a managed service, you can do the same by following the provider’s documentation.-
Make necessary changes to the
pg_hba.conffile to allow connections to the ClickPipes user from the ClickPipes IP addresses. An example entry in thepg_hba.conffile would look like: -
Reload the PostgreSQL instance for the changes to take effect:
Increase max_slot_wal_keep_size
This is a recommended configuration change to ensure that large transactions/commits don’t cause the replication slot to be dropped.
You can increase the max_slot_wal_keep_size parameter for your PostgreSQL instance to a higher value (at least 100GB or 102400) by updating the postgresql.conf file.
For better recommendation of this value you can contact the ClickPipes team.