Coordimap
ConfigurationPostgreSQL

PostgreSQL Configuration

Configuring A PostgreSQL Data Source In Coordimap

This guide explains how to configure the Coordimap agent to crawl a PostgreSQL server. With PostgreSQL configured correctly, Coordimap can discover databases, schemas, tables, indexes, and relationships, then keep those diagrams updated over time.

For PostgreSQL, use the server or cluster system_identifier as scope_id. That value represents the database lineage more accurately than any Coordimap connector ID or friendly label.

Prerequisites

Before you start, make sure you have:

  1. Installed the Coordimap agent in an environment that can reach the PostgreSQL server.
  2. Added the PostgreSQL data source in the Coordimap UI so you have a data_source_id.
  3. Created a read-only PostgreSQL user for the agent.

Use a read-only user

Use a dedicated read-only PostgreSQL user whenever possible. Follow the setup guide here: PostgreSQL Read-Only User.

Find The Correct scope_id

Use the PostgreSQL system identifier:

SELECT system_identifier FROM pg_control_system();

If pg_control_system() is unavailable in your environment, retrieve the same value with PostgreSQL system tooling such as pg_controldata.

Configuration File Structure

coordimap:
  api_key: ${COORDIMAP_API_KEY}
  data_sources:
    - type: postgres
      data_source_id: <YOUR_DATASOURCE_ID_FROM_UI>
      config:
        - name: scope_id
          value: "<POSTGRES_SYSTEM_IDENTIFIER>"
        - name: db_name
          value: "mydatabase"
        - name: db_host
          value: "postgres.example.com"
        - name: db_port
          value: "5432"
        - name: db_user
          value: "coordimap_readonly_user"
        - name: db_pass
          value: ${POSTGRES_PASSWORD}
        - name: ssl_mode
          value: "require"
        - name: crawl_interval
          value: "10m"

Configuration Options

Attribute NameRequiredDescription
typeYesThe data source type. For PostgreSQL this must be postgres.
data_source_idYesThe Coordimap data source identifier created in the UI. It identifies the connector record, not the PostgreSQL server identity.
config.name: scope_idYesStable upstream identity for the PostgreSQL server or cluster. Use system_identifier.
config.name: db_nameYesThe PostgreSQL database name to connect to.
config.name: db_hostYesHostname or IP address of the PostgreSQL server.
config.name: db_portNoPostgreSQL port. If omitted, the standard PostgreSQL default is typically used.
config.name: db_userYesDatabase user the agent connects with. Use a read-only user.
config.name: db_passYesPassword for db_user. Prefer an environment variable.
config.name: ssl_modeNoSSL mode such as disable, allow, prefer, require, verify-ca, or verify-full.
config.name: crawl_intervalNoHow often the agent refreshes the schema inventory. See Shared Configuration Options.

Why scope_id Matters For PostgreSQL

PostgreSQL assets should stay attached to the same upstream server identity even if you recreate the Coordimap connector or move the crawler. Reusing the same scope_id keeps database object identities stable and avoids duplicate graph objects for the same server lineage.

Next Steps

  1. Create or verify the read-only PostgreSQL user.
  2. Add the PostgreSQL block to the agent YAML file.
  3. Set COORDIMAP_API_KEY and any database password environment variables.
  4. Restart the agent.
  5. Verify that the PostgreSQL schema appears in Coordimap after the next crawl cycle.

On this page