How OpenMetadata connects to PostgreSQL for a data catalog
A platform team that must catalog PostgreSQL databases with owners, usage and lineage should use the OpenMetadata PostgreSQL connector, which is the supported method for pulling PostgreSQL metadata into OpenMetadata. The connector runs inside your infrastructure and reads from your databases, so the catalog stays under your control. It covers metadata, usage, profiling, data quality, dbt, lineage, owners, tags and stored procedures, so most of the catalog can be populated from one connection definition per database service.
The edges matter as much as the coverage. Stored procedure lineage is not covered, so data flows that run through functions or procedures will not appear as lineage edges and need to be documented by hand or handled in a separate review. Usage and lineage also depend on the pg_stat_statements extension, which must be loaded through shared_preload_libraries on the server. Ask your DBA to confirm that the extension is installed, loaded and collecting statements on every instance in scope, because a server without it will still catalog tables and columns but will show no query history.
Before you start, confirm three things with the database owner: that each PostgreSQL version in scope is one the connector officially supports (the OpenMetadata PostgreSQL connector documentation lists them), that the extension can be enabled under your change process, and that the ingestion account can read catalog views without write access. Decide early whether profiling and data quality tests will run against production tables, since those runs read data and add load, while metadata extraction only reads the system catalog.
The practical risk is a catalog that looks complete but has silent gaps. Plan a check after the first full run: compare table counts per schema with the source, confirm that usage counts appear for busy schemas, and record which procedures are absent so that owners know their lineage is incomplete. Put these gaps in the catalog documentation so that consumers do not read missing lineage as proof that no dependency exists.
Prerequisites for a PostgreSQL connection in OpenMetadata
Before the PostgreSQL connector runs, four things need to be in place: a supported PostgreSQL version, the OpenMetadata deployment it will feed, the extension that supplies usage and lineage history, and a locked-down account with a network path and encryption. Confirm the exact connector parameters against the OpenMetadata version you run, since the connector configuration changes between releases.
Supported PostgreSQL versions
The connector supports only officially supported PostgreSQL versions. Today that means 18, 17, 16, 15 and 14, with 14 reaching end of life on November 12, 2026. Versions 13 and earlier are unsupported, so a catalog project against them will hit compatibility problems. Plan the catalog around the version you will run for the next few years, and treat an upcoming end-of-life date as a trigger to schedule a major upgrade before the connection is built, not after.
PostgreSQL versioning policyOpenMetadata deployment and sizing
Decide where OpenMetadata runs before choosing connector settings, because the ingestion workers and the server must reach the database. The documented bare metal path needs Java 21, MySQL 8.0.42 or later or PostgreSQL 15 or later for OpenMetadata's own store, and Elasticsearch 9.x or OpenSearch 3.x for search. Kubernetes and Docker are also documented. Confirm the sizing for your catalog volume with the deployment guide.
Bare metal prerequisitespg_stat_statements in shared_preload_libraries
Usage and lineage depend on the pg_stat_statements extension, which must be listed in shared_preload_libraries and loaded at server start. Adding it requires a restart, so schedule the change with the database owner. Without it, the catalog still gets metadata, but query-based usage and lineage will be missing. Check the extension is created in the target database and that the ingestion account can read its view.
Network path and TLS
The OpenMetadata ingestion workers need a network route to the PostgreSQL host and port, which often means a firewall rule or security group change in the database network. Ask the database team whether connections go through a pooler such as PgBouncer or directly to the server. Enable TLS for the connection and confirm which certificate authority and verification mode the connector parameters expect in your version.
PgBouncer documentationRead-only ingestion account
Create a dedicated login role for ingestion rather than reusing an administrator or application account. Grant it connect and read access to the schemas being cataloged, and read access to the statistics views for usage. Avoid write privileges, since the connector only reads metadata and sample data for profiling. Document the grants in a change record so the security team can review them and rotate the password on a set schedule.
Authentication method for the account
PostgreSQL offers several client authentication methods, and the ingestion account should use one the security team already controls. SCRAM is the recommended password method, since PostgreSQL 18 deprecated MD5 password authentication. Certificate authentication can avoid stored passwords if your connector version supports it. Confirm which method your OpenMetadata version accepts before you set up the account, because a mismatch shows up as a connection error during the first test run.
Authentication methodsConfiguring the PostgreSQL service step by step
This sequence takes a PostgreSQL database from an unregistered server to a cataloged OpenMetadata service with metadata, usage and profiling runs in place. Each step ends with a check so the team can confirm it worked before moving on.
Confirm the PostgreSQL version is supported
The DBA or platform engineer checks the server's major version against the PostgreSQL versioning policy before anything else. Only officially supported major versions are covered by the OpenMetadata PostgreSQL connector, and versions 13 and earlier are unsupported. Confirm the version with the connector documentation for the OpenMetadata release you run, since support can change between releases. Done when the version and its end-of-support date are recorded in the change ticket.
Create the ingestion role with read grants
The DBA creates a dedicated login role for OpenMetadata and grants it read access to the schemas to be cataloged, plus the privileges the connector needs for metadata. Keep the role separate from application accounts and from any role that can write data. Store the password in your secrets manager, not in the service configuration file. Done when a test login with that role can list the target schemas and tables from a client session.
Enable pg_stat_statements and restart
The DBA adds pg_stat_statements to shared_preload_libraries in postgresql.conf, which requires a server restart, and plans that restart in a maintenance window. Usage and lineage depend on this extension, so the restart is the only way to make those runs produce data. Confirm the setting with a query against the server configuration view after the restart. Done when the parameter shows the extension loaded and the server accepts connections again.
Create the extension in the target database
Connected to the target database, a user with sufficient privilege runs CREATE EXTENSION for pg_stat_statements. The extension must exist in the database the connector reads from, so a database added later needs the same step. Check that the ingestion role can read the statistics view, which the usage run queries. Done when a simple select against the statistics view returns rows after a few queries have run on the server.
Register the database service in OpenMetadata
An OpenMetadata administrator adds a PostgreSQL database service in the UI or through the API, entering host, port, database name and the ingestion role. Store credentials through the secret handling your OpenMetadata deployment supports. Run the connection test before saving the service. Done when the test connection reports success for every check it lists, and the service appears in the services list.
Run metadata ingestion
The platform team runs the metadata ingestion workflow for the service, with schema and table filters set to the scope agreed with data owners. Ingestion brings in schemas, tables, columns, owners and tags that the connector covers. Review the run log for skipped objects and filter mistakes. Done when the run completes and the expected schemas, tables and columns appear in the catalog with the correct service path.
Enable usage, profiler and lineage runs
Once metadata is in place, the team enables usage, lineage and profiler workflows, and schedules them after the metadata run they depend on. Profiler runs read table data, so set sampling and table scope deliberately and agree them with the database owner. Confirm the usage run has read the statistics view and that lineage edges appear where queries reference other tables. Done when the usage tab shows query activity for a known table and the profiler shows row counts and column statistics for a sampled table.
How PostgreSQL schemas, roles and queries map to OpenMetadata entities
The PostgreSQL connector creates a service for the cluster, then a database entity for each database it reads, a database schema entity for each schema, and table entities for tables and views, with column entities beneath them. Owners, tags and descriptions are attached at these levels, so the team that reviews the catalog should check the hierarchy first: a schema that is filtered out during ingestion will leave its tables missing, and a database that is not included in the connection will not appear at all. Stored procedures are extracted as entities, which means they can be found and described, but the connector does not build lineage from them. Plan for that gap in any impact analysis that depends on procedural logic.
Usage and query-based lineage come from the pg_stat_statements extension, which must be loaded through shared_preload_libraries on the server before the connector can read query history. The connector reads the statements that PostgreSQL has recorded, then uses them to rank table popularity and to infer table-to-table relationships from queries. Those statistics reflect what the server has retained, not a full audit trail, so the lineage shown reflects the workload observed during the retention window. Confirm the extension version and its view columns against the connector documentation for your OpenMetadata version before you rely on the output.
Roles matter at two points. The user the connector authenticates as needs read access to the catalog and to the statistics views, and its privileges determine which schemas and tables appear in the result. Treat the role grants as a reviewed part of the design, not a default. Because the mapping between PostgreSQL objects and OpenMetadata entities has changed across releases, check the entity names, the lineage rules and the required grants against the OpenMetadata PostgreSQL connector docs for the exact version you deploy, and run a test ingestion against a non-production database to confirm what appears.
PostgreSQL objects and what OpenMetadata extracts from each
This table maps each PostgreSQL object to the OpenMetadata entity it becomes and the feature that depends on it. Read the last column first when scoping, because it shows where the connector's coverage stops and which items need manual work or another tool.
| PostgreSQL object | What OpenMetadata extracts | Feature that uses it | Where coverage stops |
|---|---|---|---|
| Database and schemas | Database service, database and schema entities under the service you define | Catalog hierarchy, domain assignment, ownership | Schema filters must be set in the connector; unfiltered runs can import system schemas you do not want |
| Tables and views | Table and view entities with descriptions and table types | Search, glossary terms, tags, data quality tests | Descriptions and glossary links set in the UI are not written back to PostgreSQL |
| Columns and data types | Column entities with data types and constraints | Column-level documentation, classification, profiling | Column meaning comes from comments or manual entry; the connector does not infer business definitions |
| View definitions | View SQL used to build table-level lineage | Lineage across views and downstream tables | Lineage depends on parseable SQL; complex dynamic SQL may not resolve |
| Stored procedures | Procedure entities as listed by the connector | Catalog visibility and documentation | Stored procedure lineage is not covered by the connector |
| Roles and owners | Owner information where the connector can read it, mapped to OpenMetadata users or teams | Ownership and accountability workflows | Ownership in PostgreSQL is rarely maintained; confirm which owner source you will use and assign the rest manually |
| Query statistics | Usage and query history read from pg_stat_statements | Usage popularity and table lineage from logged queries | Requires pg_stat_statements loaded through shared_preload_libraries; statements are only as complete as the extension's retained history |
| Profiling results | Column statistics computed by the profiler run against the database | Profiling, data quality tests, freshness checks | Profiling runs queries on your tables, so cost and load depend on table size and sampling settings you choose |
Securing the ingestion account and the connection
The PostgreSQL connector reads metadata, usage and profiling data through a database account, so that account and the path to it set the risk. The cards below cover the role, transport encryption, password storage, usage statistics visibility, network paths and rotation, in the order a team would usually settle them.
Dedicated read-only ingestion role
Create a separate PostgreSQL login used only by OpenMetadata, not a shared administrator or application account. Grant it read access to the schemas you want cataloged and nothing that writes. Confirm the exact grants against the connector documentation for your version, because the connector's permission needs differ between metadata, profiling and usage. Review the role after each connector release.
Connector docsTLS on the database connection
Require encrypted connections from the ingestion runner to PostgreSQL, so credentials and catalog metadata do not cross the network in clear text. Decide whether the server certificate is verified against a trusted CA, and confirm which SSL mode and certificate fields the connector exposes in your version. Test the connection with the mode you intend to keep in production, not a looser one used during setup.
Password kept in a secrets store
Keep the ingestion password out of connection files, Git repositories and container images. Store it in the secrets system your platform already operates, and let the runner read it at execution time. Confirm how your OpenMetadata deployment resolves secret references for database connections before you rely on that method, and restrict who can read the secret to the team that runs ingestion.
Limiting pg_stat_statements visibility
Usage and lineage come from pg_stat_statements, and that view can expose query text from other roles. Check which roles can see full query text in your cluster, and decide whether the ingestion role should see every statement or only the data it needs. Keep the extension in shared_preload_libraries only where usage data is wanted, and tell the data owners that query text is collected.
Network allowlisting between runner and database
Allow connections to PostgreSQL only from the addresses of the ingestion runner or its subnet, and deny other sources at the database host and the firewall. Keep the OpenMetadata server, the search service and the runner in the same controlled network segment so the database is not reachable from user networks. Document each allowed path, because it becomes part of the review evidence.
Rotation and access review
Plan a rotation schedule for the ingestion password, with a documented step to update the secret and rerun a test connection. Review who holds access to the secrets store, the runner and the role each time the connector is changed or a team member leaves. Record the rotation dates so auditors and security reviewers can confirm the account is still controlled.
Common PostgreSQL connection and usage failures
This table lists the failures teams most often hit when connecting OpenMetadata to PostgreSQL, with the likely cause and fix for each. Read it as a checklist to work through before assuming the connector itself is broken, starting with version support and extension loading.
| Failure | Likely cause | Fix |
|---|---|---|
| Unsupported PostgreSQL version | The source runs a major version that is no longer supported, such as 13 or earlier, so the connector is not tested against it. | Confirm the server version with SELECT version(). Upgrade to a supported major version (18, 17, 16, 15 or 14) before ingesting, and check the support end dates in the PostgreSQL versioning policy. |
| pg_stat_statements not loaded after restart | The extension is created but not listed in shared_preload_libraries, or the server was not restarted after the change, so usage and lineage queries return nothing. | Add pg_stat_statements to shared_preload_libraries in postgresql.conf, restart PostgreSQL, then confirm with SHOW shared_preload_libraries. A reload alone is not enough for this setting. |
| Extension missing in the target database | pg_stat_statements is loaded on the server but not created in the database the connector reads, so the view is not found there. | Run CREATE EXTENSION IF NOT EXISTS pg_stat_statements in the database the connector targets. Verify the view exists with a simple SELECT against pg_stat_statements from that database. |
| Missing read grants on schemas | The connector user lacks USAGE on schemas or SELECT on tables, so some schemas, tables or columns are skipped during metadata or profiling runs. | Grant USAGE on each schema in scope and SELECT on the tables to profile. Confirm the exact grants required for metadata, usage and profiling in the connector documentation before granting more. |
| TLS or network refusal | The server rejects SSL connections, the certificate chain is not trusted by the ingestion host, or a firewall or pg_hba.conf rule blocks the ingestion source address. | Check the ssl setting and the pg_hba.conf entry for the ingestion host. Test with psql using the same host, port and sslmode, then supply the CA certificate the connector needs. |
| Empty usage data | Statistics were reset, the extension was loaded after workload ran, or the query history is shorter than the window the connector reads, so no rows come back. | Wait for representative workload after the extension is loaded, avoid resetting statistics during the ingestion window, and check that pg_stat_statements has rows before running usage ingestion again. |
| Lineage gaps reported as failures | Stored procedure logic is not parsed for lineage, so procedure-driven tables appear without upstream sources. | Treat this as a documented scope limit, not a connector fault. Record the affected procedures and plan manual lineage edits or a separate review for them. |
Questions buyers ask before connecting PostgreSQL to OpenMetadata
Who does the work of connecting PostgreSQL to OpenMetadata?
Either your platform or data team can do it, or an implementation partner can do it under a written scope. The split usually depends on whether your team already runs OpenMetadata and has a clear owner for database access. Work typically covers the OpenMetadata ingestion setup, a read-only database role, scheduling, profiler and data quality settings, and the change window for PostgreSQL configuration. Ask any partner to name which tasks they perform and which ones stay with your staff, including who signs off on the database change.
What makes the effort larger or smaller?
The main drivers are how many databases, schemas and tables you want cataloged, and whether you need usage and lineage or only metadata. Usage and lineage depend on the pg_stat_statements extension loaded through shared_preload_libraries, which is more work than a basic metadata pull. Profiling and data quality tests add scope because they read table data. Other drivers include how many environments you run, how many owners need to review results, and whether you plan to add dbt or stored procedure metadata.
Does enabling pg_stat_statements require restarting PostgreSQL?
Yes. The extension is loaded through shared_preload_libraries, and changes to that setting take effect only after a server restart. Confirm the exact steps in the PostgreSQL and OpenMetadata connector documentation for your version. Before work starts, agree on a change window, a rollback plan, and who approves a restart on production clusters. If your PostgreSQL runs in a high availability setup, plan the restart order across primary and standbys so reads and writes are protected during the change.
Does our platform team need prior OpenMetadata experience?
Prior experience shortens the work but is not strictly required. Useful skills include Docker or Kubernetes operations, managing service accounts and secrets, and reading PostgreSQL logs and catalog views. Teams new to OpenMetadata usually spend more time on ingestion scheduling, permission troubleshooting and deciding how ownership and tags should be applied. Ask a partner to show how knowledge will transfer, such as runbooks, configuration documentation and a walkthrough with your engineers.
Can we do this ourselves without a partner?
Many teams can, particularly if they have a single PostgreSQL service and a small number of databases. The hard parts are usually the database change control, the role grants and the verification that lineage and usage are complete. Compare your team's time against the written scope, including testing, documentation and handover. Ask what a partner would deliver that your team would otherwise build, such as a tested configuration, a restart runbook and a retest after upgrades.
What should a written scope include before we agree on cost?
A useful scope lists each PostgreSQL cluster, database and schema in the catalog, and which capabilities are in scope: metadata, usage, lineage, profiling, data quality, dbt, owners and tags. It should name the OpenMetadata deployment target, the access model for the ingestion user, the change window for restarts, and the testing and handover deliverables. Also confirm what is excluded, such as stored procedure lineage, which the connector does not cover. Ask for acceptance criteria tied to specific catalog results.
What recurring work comes after the first connection?
Ongoing work includes OpenMetadata upgrades, PostgreSQL minor and major upgrades, connector changes when new schemas appear, and review of profiler and data quality cost on large tables. PostgreSQL minor releases come at least once every three months, and each major version is supported for 5 years after release, so the connector should be retested as those versions change. Ask whether a partner offers a retainer for these tasks and how upgrades are scoped and priced.
Which PostgreSQL versions must we run to use this connector?
The connector supports only officially supported PostgreSQL versions. Check the current support dates in the PostgreSQL versioning policy before choosing a target, since versions 13 and earlier are unsupported. If you run an older major version, plan a major upgrade alongside the catalog work so the connector is not tied to an unsupported database. Confirm the supported version list against the OpenMetadata connector documentation at the time of your engagement.
How the ingestion path reads PostgreSQL metadata and query history
The ingestion runner starts inside the catalog network and connects to PostgreSQL with a read-only role over the network path you open for it. It reads the catalog views for schemas, tables and columns, and reads pg_stat_statements for usage and query history, which only exists if the extension is loaded through shared_preload_libraries. Metadata then goes to OpenMetadata as entities and lineage. Check that the runner, not the database, is the only component that crosses the trust boundary, and that the role has no write grants.
Read-only access crosses from the database network to the catalog network through one ingestion runner.
What the PostgreSQL connector does not cover and how to plan around it
The PostgreSQL connector does not extract stored procedure lineage, so a function or procedure that reads one table and writes another will not appear as a lineage edge in OpenMetadata. Even though the connector covers stored procedures as objects, the flow of data through them has to be recorded another way. For each procedure-driven flow that feeds a report, a regulatory extract or a downstream model, decide whether the lineage will be maintained manually as an edge in OpenMetadata or documented in a runbook that names the procedure, its source tables, its targets and its schedule. Put the owner of that entry on the same list as the owner of the table.
Lineage in OpenMetadata also depends on what the database has recorded. Usage and query-based lineage come from the query history captured through pg_stat_statements, which is loaded through shared_preload_libraries and keeps a bounded set of statements. Queries that were evicted, ran before the extension was enabled, or were issued from a session the connector cannot see will leave gaps. Short-lived batch jobs and ad hoc statements are the most likely to be missed. Ask the database team how long the extension retains statements on your cluster and whether the ingestion schedule runs often enough to capture the workload before it is evicted.
Confirm each gap against the connector version you run, because coverage changes between releases and the supported PostgreSQL versions are listed in the connector documentation. Run a small set of known flows, such as one procedure, one view chain and one scheduled query, and check what appears in the lineage view. Record every accepted gap in a register that names the affected flow, the workaround, the owner and a review date, and give that register to the governance owners so that a missing edge is a known decision and not a surprise during an audit or an incident.
How DeployOpen scopes and delivers OpenMetadata PostgreSQL integrations
DeployOpen plans, implements, documents and supports self-hosted open-source platforms inside your own infrastructure, including OpenMetadata. For PostgreSQL, we start from which databases, roles and extensions your team can approve, then build and hand over the connector configuration so your own engineers can run it.
How we scope
- Inventory the PostgreSQL versions, databases and schemas that the catalog should cover, and confirm they are officially supported versions.
- Confirm whether pg_stat_statements can be loaded through shared_preload_libraries on each server, and who approves that change.
- Record in writing that stored procedure lineage is outside the connector, so the agreed scope and expectations match what will be delivered.
How we build
- Create a read-only ingestion role with the grants agreed in scope, and document each permission against the connector feature it enables.
- Configure metadata, usage, profiler, lineage, owner and tag ingestion as separate, testable runs with their own schedules and logs.
- Test each run against a non-production database first, then review profiler scope and sampling before pointing ingestion at production.
How we hand over
- Deliver a runbook covering connection settings, role grants, scheduled runs, and the steps to rotate credentials.
- Walk your data platform and security teams through what the connector reads, what it cannot see, and where lineage stops.
- Provide written records of test results and configuration so your compliance or security reviewers can check the setup.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, scoped in writing after the initial handover.
- Plan PostgreSQL major version changes alongside connector and OpenMetadata upgrades so ingestion stays on supported versions.
- Review failed ingestion runs and permission changes with your team on the agreed support schedule.

