Starting Release 2.18.1, Hevo will stop supporting XMIN as a query mode for all variants of the PostgreSQL Source. As a result, you will not be able to create new Pipelines using this query mode. This change does not affect existing Pipelines. However, you will not be able to change the query mode to XMIN for any objects currently ingesting data using other query modes.
Azure PostgreSQL Database 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
Perform the following steps to configure your Azure PostgreSQL Source:
Create a Read Replica (Optional)
To use an existing read-replica or connect Hevo to your master database, skip to the Set up Log-based Incremental Replication section.
To create a read-replica:
-
Log in to the Azure Portal.
-
Under Recent resources, select the database for which you want to create a read-replica.

-
Under Settings, click Replication, and then, click + Add Replica.

-
In the Server name field, specify a unique name for the replica server and click OK.

A notification is displayed to confirm that the read-replica was created successfully.

Set 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, the replication method is set to REPLICA. You must change it to LOGICAL.
To do this:
-
Log in to the Azure Portal.

-
Under Resources, Recent tab, select the database for which you want to change the replication mode. For example, postgresql-docs in the image below.

-
In the left navigation pane of your <Database Name> page, under Settings, click Replication.

-
In the right pane, set Azure replication support to LOGICAL and click Save.
-
Click YES in the confirmation dialog to restart the PostgreSQL server for the parameter changes to take effect.

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

Whitelist 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:
-
Log in to the Azure Portal.
-
Under Resources, select the database you want to synchronize with Hevo.

-
Under Settings, click Connection security.
-
Create a Firewall Rule:
-
Specify a firewall rule Name.
-
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.
-
Click Save.
-
Repeat this step to add the IP address for each applicable Hevo region.
Create a Database User and Grant Privileges
1. Create a database user (optional)
To create a database user, open your Azure PostgreSQL database in your SQL client tool as a user with CREATE
privilege and enter the following command:
CREATE ROLE hevo WITH LOGIN NOSUPERUSER INHERIT CREATEDB CREATEROLE REPLICATION PASSWORD '<password>';
Note: Replace password
above with a password of your choice.
2. Grant privileges to the user
The database user specified in the Hevo Pipeline must have the following privileges:
To assign these privileges:
-
Log in to your Azure PostgreSQL database as a user with admin
privilege.
-
Enter the following commands to give accesses to the database user:
GRANT CONNECT ON DATABASE <database_name> to hevo;
GRANT USAGE ON SCHEMA <schema_name> TO hevo;
-
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 hevo;
GRANT SELECT ON ALL TABLES IN SCHEMA <schema_name> TO hevo;
Retrieve the Hostname and Port Number (Optional)
Note: The Azure PostgreSQL hostnames start with your database name and end with azure.com.
For example:
Host: postgres.database.azure.com
Port: 5432
To retrieve the hostname:
-
Log in to the Azure Portal.
-
Under Recent resources, select your Azure Database for PostgreSQL server.

-
In the Essentials panel, locate the Server name. Use this Server name as the hostname in Hevo while creating your Pipeline.

The default port is 5432.
Specify Azure PostgreSQL Connection Settings
-
In the Configure your Azure PostgreSQL Source page, specify the following:

-
Pipeline Name: A unique name for your Pipeline, not exceeding 255 characters.
-
Database Host: The Azure PostgreSQL host’s IP address or DNS. For example, postgres.database.azure.com.
Note: For a URL-based hostname, exclude the http://
or https://
part. For example, if the hostname URL is https://postgres.database.azure.com, enter postgres.database.azure.com.
-
Database Port: The port on which your Azure PostgreSQL server listens for connections. Default value: 5432.
-
Database User: The read-only user who has the permission to read tables in your database.
-
Database Password: The password for the read-only user.
-
Select an Ingestion Mode: The desired mode by which you want to ingest data from the Source. This section is expanded by default. However, you can collapse the section by clicking SEE LESS. Default value: Logical Replication.
The available ingestion modes are Logical Replication, Table, and Custom SQL. Logical Replication is the recommended ingestion mode and is selected by default.

Depending on the ingestion mode you select, you must configure the objects to be replicated. Refer to section, Object and Query Mode Settings for the steps to do this.
Note: For the Custom SQL ingestion mode, all Events loaded to the Destination are billable.
-
Database Name: The name of an existing database that you wish to replicate.
-
Schema Name (Optional): The schema in your database that holds the tables to be replicated. Default value: public.
Note: The Schema Name field is displayed only for Table and Custom SQL ingestion modes.
-
Connection Settings:
-
Connect through SSH: Enable this option to connect to Hevo using an SSH tunnel, instead of directly connecting your PostgreSQL database host to Hevo. This provides an additional level of security to your database by not exposing your PostgreSQL setup to the public. Read Connecting Through SSH.
If this option is turned off, you must whitelist Hevo’s IP addresses.
-
Use SSL: Enable this option to use an SSL-encrypted connection. Specify the following:
-
CA File: The file containing the SSL server certificate authority (CA).
-
Client Certificate: The client’s public key certificate file.
-
Client Key: The client’s private key file.
-
Advanced Settings
-
Load Historical Data: Applicable for Pipelines with Logical Replication mode.
If enabled, the entire table data is fetched during the first run of the Pipeline.
If disabled, Hevo loads only the data that was written in your database after the time of creation of the Pipeline.
-
Merge Tables: Applicable for Pipelines with Logical Replication mode.
If enabled, Hevo merges tables with the same name from different databases while loading the data to the warehouse. Hevo loads the Database Name field with each record.
If disabled, the database name is prefixed to each table name. Read How does the Merge Tables feature work?
-
Include New Tables in the Pipeline: Applicable for all ingestion modes except Custom SQL.
If enabled, Hevo automatically ingests data from tables created in the Source after the Pipeline has been built. These may include completely new tables or previously deleted tables that have been re-created in the Source.
If disabled, new and re-created tables are not ingested automatically. They are added in SKIPPED state in the objects list, in the Pipeline Overview page. You can include these objects post-Pipeline creation to ingest data.
You can change this setting later.
-
Click TEST CONNECTION. This button is enabled once you specify all the mandatory fields. Hevo’s underlying connectivity checker validates the connection settings you provide.
-
Click TEST & CONTINUE to proceed for setting up the Destination. This button is enabled once you specify all the mandatory fields.
Object and Query Mode Settings
Once you have specified the Source connection settings in Step 6 above, do one of the following:
Read the detailed Hevo documentation for the following related topics:
Source Considerations
-
If you add a column with a default value to a table in PostgreSQL, entries with it are created in the WAL only for the rows that are added or updated after the column is added. As a result, in the case of log-based Pipelines, Hevo cannot capture the column value for the unchanged rows. To capture those values, you need to:
-
Azure PostgreSQL does not support logical replication on read replicas. To enable log-based replication, you must select the master database instance.
-
For new Azure PostgreSQL databases, SSL connections may be enforced. To turn off SSL connections, do the following:
-
Log in to the Azure Portal.
-
Under Resources, Recent tab, select the database for which you want to turn off the SSL connection mode. For example, postgresql-docs in the image below.

-
In the left navigation pane of your <Database Name> page, under Settings, click Connection security.

-
In the right pane, under SSL settings, toggle the Enforce SSL connection option to DISABLED and click Save.
Limitations
-
The data type Array in the Source is automatically mapped to Varchar at the Destination. No other mapping is currently supported.
-
Hevo does not support data replication from foreign tables, temporary tables, and views.
-
If your Source data has indexes (indices) and constraints, you must recreate them in your Destination table, as Hevo does not replicate them from the Source. It only creates the existing primary keys.
-
Hevo does not set the __hevo_marked_deleted
field to True for data deleted from the Source table using the TRUNCATE command. This could result in a data mismatch between the Source and Destination tables.
-
Hevo does not support Azure Database for PostgreSQL - Flexible Server.
See Also
Revision History
Refer to the following table for the list of key updates made to this page:
Date |
Release |
Description of Change |
Nov-03-2023 |
NA |
Renamed section, Object Settings to Object and Query Mode Settings. |
Oct-11-2023 |
NA |
Updated section, Limitations to add information about Hevo not supporting Azure Database for PostgreSQL - Flexible Server. |
Oct-03-2023 |
NA |
Updated sections: -Set up Log-based Incremental Replication to reflect the changed Azure PostgreSQL UI, - Specify Azure PostgreSQL Connection Settings to describe the schema name displayed in Table and Custom SQL ingestion modes, - Source Considerations to add information about logical replication not supported on read replicas, and - Limitations to add limitations about data replicated by Hevo. |
Sep-19-2023 |
NA |
Updated section, Limitations to add information about Hevo not supporting data replication from certain tables. |
Jun-26-2023 |
NA |
Added section, Source Considerations. |
Apr-21-2023 |
NA |
Updated section, Specify Azure PostgreSQL Connection Settings to add a note to inform users that all loaded Events are billable for Custom SQL mode-based Pipelines. |
Mar-09-2023 |
2.09 |
Updated section, Specify Azure PostgreSQL Connection Settings to mention about SEE MORE in the Select an Ingestion Mode section. |
Dec-19-2022 |
2.04 |
Updated section, Specify Azure PostgreSQL Connection Settings to add information that you must specify all fields to create a Pipeline. |
Dec-07-2022 |
2.03 |
Updated section, Specify Azure PostgreSQL Connection Settings to mention about including skipped objects post-Pipeline creation. |
Dec-07-2022 |
2.03 |
Updated section, Specify Azure PostgreSQL Connection Settings to mention about the connectivity checker. |
Jul-04-2022 |
NA |
- Added sections, Specify Azure PostgreSQL Connection Settings and Object Settings. |
Jan-24-2022 |
1.80 |
Removed from Limitations that Hevo does not support UUID datatype as primary key. |
Sep-09-2021 |
1.71 |
Updated the section, Limitations to include information about columns with the UUID data type not being supported as a primary key. |
Sep-06-2021 |
NA |
Updated the section, Limitations to remove the mention of SSL login not being supported, as it is supported now. |
Feb-22-2021 |
1.57 |
Added sections: - Create a Read Replica - Create a User and Grant Privileges - Retrieve the Hostname and Port Number. |