Skip to main content
This guide explains how to connect Coalesce Quality to Postgres securely.We need this information so we can collect metadata about your tables.To be able to finish this guide, you’ll need the following:
→ Access to modify your Postgres configuration
⏱️ Estimated time to finish: 10 minutes.
Coalesce Quality reads the catalog of your database from pg_catalog: schemas, tables, views, materialized views, columns, comments, constraints and view definitions, and each table’s row count and size from the planner’s statistics. It never reads table rows to build the catalog. The following setup:
  1. Creates a dedicated user and user group for Coalesce Quality
  2. Grants access to the schemas you want to monitor
  3. Optionally grants SELECT, for monitors that query your data

Create a dedicated user with sufficient permissions

Grant access to the relevant schemas

Run this for every schema you want Coalesce Quality to monitor. It is all the catalog, the table metrics and the volume and freshness monitors need.

Grant access to table data (optional)

Required if you want Coalesce Quality to read rows: Custom SQL monitors, data previews, column profiling and SQL tests.
Run these for every schema you want those monitors on.
ALTER DEFAULT PRIVILEGES only affects tables created by the role you name in FOR ROLE. Set "table_owner" to the role that actually creates your tables (usually your application or migration user). Otherwise synq_group does not get SELECT on new tables, and Custom SQL monitors on them fail. If several roles create tables in the schema, repeat the statement once per owner.

Network Configuration

Depending on your database configurations, you may need to whitelist Coalesce Quality’s IP addresses in your firewall or security groups. See IP Whitelist for the complete list of IP addresses by region.

Input data in the UI

Integration name

E.g., postgres

Database

The name of your Postgres database

Host

The name of your host, e.g., database-1.<host>.eu-north-1.rds.amazonaws.com

Port

The default is 5432

Username and password

Username and password you specified earlier in the guide

Audit table name (optional)

Table for SQL test audit logs, e.g. quality_sql_test__audit. Coalesce Quality creates it if it does not exist. Leave empty if you don’t run SQL tests.

Fetch table metrics

On by default. Reads the row count, size and last change time of each table every 30 minutes. The automatic volume and freshness monitors need these metrics.

Catalog scope and Metrics scope (optional)

Restrict which schemas and tables are ingested into the catalog, and which of those are scanned for metrics. Leave both empty to ingest everything the user can see.

SSH tunnel (optional)

If your Postgres instance is only reachable through a bastion host, click Add SSH tunnel and fill in the user, hostname and port of the bastion (22 unless you run SSH elsewhere). Leave this empty for instances Coalesce Quality can reach directly. Coalesce Quality authenticates to the bastion with an RSA key pair it generates when you save the integration. Only the public half leaves the platform; it is shown under SSH tunnel key pair at the bottom of the integration’s page. Add it as a line in the ~/.ssh/authorized_keys file of the bastion user you entered. The bastion refuses the connection until that line is in place, so testing the connection before then fails.

Rotating the tunnel key pair

The same SSH tunnel key pair section replaces the key. This needs the Admin role. Generate a new key pair takes effect immediately, and the key it replaces keeps being offered for a week, so the tunnel carries on working while you install the new one. The section shows the previous public key and the date it stops being offered. Add the new public key to authorized_keys, then delete the line with the previous one. Deleting that line revokes the old key. Coalesce Quality has no access to your bastion, so a key left in the file stays usable after the week is over. Only the most recent replacement is kept, so generating a second key pair while a previous key is still being offered retires that one straight away. Finish installing one key before generating the next.