PostgreSQL
Find out how to connect PostgreSQL to your data warehouse effortlessly.
In this page you will learn how to connect PostgreSQL to Erathos to move your data seamlessly.
The available connections between databases and the Erathos platform are through Open Connection, Static IP and SSH tunnel.
Connecting PostgreSQL:
Log in to your Erathos account
Select PostgreSQL as connector
Name your connection
Fill in the following form with the required information

On the Advanced Connection Settings, you can optionally activate connecting through a SSH tunnel by filling in the fields ssh_host, ssh_keepalive_interval, ssh_password, ssh_port, and ssh_user.

When using CDC, the following values may be used in cdc_snapshot_mode:
initial: performs an initial snapshot, after it completes, streaming following changes from WAL.
no_data: does not perform any snapshots, only streams changes that are currently available on WAL
Don't forget to click on Save and close to advance to the next steps of the integration.
With this connection created you can seemlessly move your PostgreSQL data to your BigQuery, Redshift or Postgres data-warehouse.
CDC setup
In order to enable CDC in your PostgreSQL connection you need to confirm the following settings in your database.
The following query should return the values wal_level = logical, max_replication_slots = 10 (or higher) and max_wal_senders = 10 (or higher), max_slot_wal_keep_size ≠ -1 (to safely prevent replication failures from completely filling the database disk, a hard limit should be set based in your database disk size).
Important: You must restart the database to apply changes to the settings above. The only exception is max_slot_wal_keep_size, which supports hot-reloading.
By default each UPDATE/DELETE statement on a given table will not collect the complete before/after state of the affected records, only when set as FULL identity will cdc be able to capture such changes. The queries below can be used the ascertain the replica identity configuration and update it to FULL when necessary.
At the database side, the last configuration that needs to be confirmed is whether the credentials being used have the privilege for replication access.
Important: By default, a replication slot will retain an infinite amount of WAL data. You need to set a hard ceiling to prevent a CDC failure from completely consuming your disk space through the max_slot_wal_keep_size setting.
Replication slot removal
In order to delete the replication slot when deleting the connection or to free up space in your database disk, use the following queries:
Last updated

