PostgreSQL Source

PostgreSQL is a powerful, open source object-relational database.

About

PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

Available Tools

PostgreSQL Source Tools

Tool NameDescription
postgres-database-overviewThe "postgres-database-overview" fetches the current state of the PostgreSQL server.
postgres-execute-sqlA "postgres-execute-sql" tool executes a SQL statement against a Postgres database.
postgres-get-column-cardinalityThe "postgres-get-column-cardinality" tool estimates the number of unique values in one or all columns of a Postgres database table.
postgres-list-active-queriesThe "postgres-list-active-queries" tool lists currently active queries in a Postgres database.
postgres-list-available-extensionsThe "postgres-list-available-extensions" tool retrieves all PostgreSQL extensions available for installation on a Postgres database.
postgres-list-database-statsThe "postgres-list-database-stats" tool lists lists key performance and activity statistics of PostgreSQL databases.
postgres-list-indexesThe "postgres-list-indexes" tool lists indexes in a Postgres database.
postgres-list-installed-extensionsThe "postgres-list-installed-extensions" tool retrieves all PostgreSQL extensions installed on a Postgres database.
postgres-list-locksThe "postgres-list-locks" tool lists active locks in the database, including the associated process, lock type, relation, mode, and the query holding or waiting on the lock.
postgres-list-pg-settingsThe "postgres-list-pg-settings" tool lists PostgreSQL run-time configuration settings.
postgres-list-publication-tablesThe "postgres-list-publication-tables" tool lists publication tables in a Postgres database.
postgres-list-query-statsThe "postgres-list-query-stats" tool lists query statistics from a Postgres database.
postgres-list-rolesThe "postgres-list-roles" tool lists user-created roles in a Postgres database.
postgres-list-schemasThe "postgres-list-schemas" tool lists user-defined schemas in a database.
postgres-list-sequencesThe "postgres-list-sequences" tool lists sequences in a Postgres database.
postgres-list-stored-procedureThe "postgres-list-stored-procedure" tool retrieves metadata for stored procedures in PostgreSQL, including procedure definitions, owners, languages, and descriptions.
postgres-list-table-statsThe "postgres-list-table-stats" tool reports table statistics including size, scan metrics, and bloat indicators for PostgreSQL tables.
postgres-list-tablesThe "postgres-list-tables" tool lists schema information for all or specified tables in a Postgres database.
postgres-list-tablespacesThe "postgres-list-tablespaces" tool lists tablespaces in a Postgres database.
postgres-list-triggersThe "postgres-list-triggers" tool lists triggers in a Postgres database.
postgres-list-viewsThe "postgres-list-views" tool lists views in a Postgres database, with a default limit of 50 rows.
postgres-long-running-transactionsThe postgres-long-running-transactions tool Identifies and lists database transactions that exceed a specified time limit. For each of the long running transactions, the output contains the process id, database name, user name, application name, client address, state, connection age, transaction age, query age, last activity age, wait event type, wait event, and query string.
postgres-replication-statsThe "postgres-replication-stats" tool reports replication-related metrics for WAL streaming replicas, including lag sizes presented in human-readable form.
postgres-sqlA "postgres-sql" tool executes a pre-defined SQL statement against a Postgres database.

Pre-built Configurations

Requirements

Database User

This source only uses standard authentication. You will need to create a PostgreSQL user to login to the database with.

Example

kind: source
name: my-pg-source
type: postgres
host: 127.0.0.1
port: 5432
database: my_db
user: ${USER_NAME}
password: ${PASSWORD}

Tip

Use environment variable replacement with the format ${ENV_NAME} instead of hardcoding your secrets into the configuration file.

Reference

fieldtyperequireddescription
typestringtrueMust be “postgres”.
hoststringtrueIP address to connect to (e.g. “127.0.0.1”)
portstringtruePort to connect to (e.g. “5432”)
databasestringtrueName of the Postgres database to connect to (e.g. “my_db”).
userstringtrueName of the Postgres user to connect as (e.g. “my-pg-user”).
passwordstringtruePassword of the Postgres user (e.g. “my-password”).
queryParamsmap[string]stringfalseRaw query to be added to the db connection string.
queryExecModestringfalsepgx query execution mode. Valid values: cache_statement (default), cache_describe, describe_exec, exec, simple_protocol. Useful with connection poolers that don’t support prepared statement caching.



Last modified March 26, 2026: chore(main): release 0.31.0 (#2814) (c6b811c)