Azure PostgreSQL

Azure Database for PostgreSQL is a relational database service based on the open-source Postgres database engine. It is a fully-managed, enterprise-ready community PostgreSQL database as a service that can handle mission-critical workloads with predictable performance, security, high availability, and dynamic scalability.

You can ingest data from your Azure PostgreSQL database using Hevo Pipelines and replicate it to a Destination of your choice.

Prerequisites

Setting up Log-based Incremental Replication

Hevo supports data ingestion from PostgreSQL servers via Write Ahead Logs set at the logical level (available on PostgreSQL version 9.4). A Write Ahead Log(WAL) is a collection of log files that record information about data modifications and data object modifications made on a PostgreSQL server instance. Typically WAL is used for data replication and data recovery.

By default, replication method is set to REPLICA. You must change this to LOGICAL. To do this:

  1. Access the Microsoft Azure Portal.

    Azure login

  2. Under Settings, click Replication.

    Replication

  3. In the right pane, select replication support as LOGICAL.

  4. Click Save.

  5. Click YES in the confirmation dialog to restart the Postgres server for the parameter changes to take effect.

    server restart message

  6. Confirm under Notifications that your changes have been applied and server has restarted successfully before running the Pipeline, to avoid errors.

Whitelisting Hevo’s IP Addresses

You need to whitelist the Hevo IP addresses for your region to enable Hevo to connect to your PostgreSQL database. You can do this by creating firewall rules in your Microsoft Azure database settings as follows:

  1. Access the Azure Portal.

  2. Under Resources, select the database you want to synchronize with Hevo.

  3. Under Settings, click Connection security.

  4. Create a Firewall Rule:

    1. Specify a firewall rule Name.
    2. Specify Hevo’s IP addresses in the Start IP and End IP fields as per your region.

      Note: As Hevo has specific IP addresses and not a range, the value in the Start IP and End IP fields is the same.

  5. Click Save.
  6. Repeat this step to add the IP address for each applicable Hevo region.

Granting Privileges to a User

Grant privileges to the database user connecting to the PostgreSQL database as follows:

  1. Log in to your Microsoft Azure PostgreSQL database as a user with grant privilege.
  2. Enter the following commands to give accesses to the database user: GRANT CONNECT ON DATABASE <database_name> TO <database_username>; GRANT USAGE ON DATABASE <database_name> TO <database_username>; GRANT SELECT ON DATABASE <database_name> TO <database_username>;

  3. Alter the schema’s default privileges to grant SELECT privileges on tables to the database user ALTER DEFAULT PRIVILEGES IN SCHEMA <schema_name>; GRANT SELECT ON TABLES TO <database_username>;

Limitations

  • Login using SSL not supported. This setting is enabled by default. You can disable it as follows:

    Disable SSL

    1. Under Settings, click Connection security.
    2. In SSL Settings on the right, set the toggle option for Enforce SSL connection to DISABLED.
    3. Click Save.
  • The data type Array in the Source is automatically mapped to Varchar at the Destination. No other mapping is currently supported.

Last updated on 04 Jan 2021