---
title: Compatibility and prerequisites
source: https://docs.newrelic.com/docs/opentelemetry/database/postgresql/compatibility
---

> #### 💡 PREVIEW
>
> We're still working on this feature, but we'd love for you to try it out!
>
> This feature is currently provided as part of a preview pursuant to our [pre-release policies](https://docs.newrelic.com/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy/).

Before you begin monitoring your PostgreSQL with NRDOT, ensure your environment meets these requirements.

## Prerequisites

Before you begin, ensure you have the following:

-   PostgreSQL `14` and above
-   Valid New Relic [license key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#ingest-license-key)
-   Network connectivity between the NRDOT Collector and your database
-   Postgres additional supplied modules installed. For most installations, this is included by default, but less conventional installations might require an additional installation of your version of [the postgresql-contrib package](https://www.postgresql.org/docs/current/contrib.html)
-   This integration is available as a part of New Relic public preview program. Check with your Organization Manager to opt in from the [Previews & Trials](https://one.newrelic.com/admin-portal/promotion-management/home) page

## Recommended server parameters [#params]

Configure the following [parameters](https://www.postgresql.org/docs/current/config-setting.html) and then restart the server for the settings to take effect. For more information about these parameters, see the [Postgres documentation](https://www.postgresql.org/docs/current/pgstatstatements.html).

### Self-hosted

Configure these parameters in the `postgresql.conf` file.

**Required parameters**

| Parameter                   | Recommended value    | Why                                                                                                                                                                                    |
| --------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `shared_preload_libraries`  | `pg_stat_statements` | Enables collection of query metrics using the [pg_stat_statements](https://www.postgresql.org/docs/current/pgstatstatements.html) extension                                            |
| `track_activity_query_size` | `4096`               | Required for collection of larger queries. Increases the size of SQL text in `pg_stat_activity`. If left at the default value, queries longer than `1024` characters aren't collected  |
| `pg_stat_statements.track`  | `ALL`                | Enables tracking of statements within stored procedures and functions                                                                                                                  |
| `pg_stat_statements.max`    | `10000`              | Increases the number of normalized queries tracked in `pg_stat_statements`. Recommended for high-volume databases that see many different types of queries from many different clients |
| `pg_stat_statements.save`   | `on`                 | Saves statistics across server restarts                                                                                                                                                |
| `track_functions`           | `all`                | Required for `postgresql.function.calls` — without it, `pg_stat_user_functions` stays empty                                                                                            |

**Optional parameters**

| Parameter                          | Recommended value | Why                                                                                                                                   |
| ---------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `pg_stat_statements.track_utility` | `off`             | Disables tracking of utility commands like `PREPARE` and `EXPLAIN`, so only queries like `SELECT`, `UPDATE`, and `DELETE` are tracked |

### RDS/Aurora

Configure these parameters in the [DB parameter group](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html).

**Required parameters**

| Parameter                   | Recommended value    | Why                                                                                                                                                                                    |
| --------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `shared_preload_libraries`  | `pg_stat_statements` | Enables collection of query metrics using the [pg_stat_statements](https://www.postgresql.org/docs/current/pgstatstatements.html) extension                                            |
| `track_activity_query_size` | `4096`               | Required for collection of larger queries. Increases the size of SQL text in `pg_stat_activity`. If left at the default value, queries longer than `1024` characters aren't collected  |
| `pg_stat_statements.track`  | `ALL`                | Enables tracking of statements within stored procedures and functions                                                                                                                  |
| `pg_stat_statements.max`    | `10000`              | Increases the number of normalized queries tracked in `pg_stat_statements`. Recommended for high-volume databases that see many different types of queries from many different clients |
| `pg_stat_statements.save`   | `on`                 | Saves statistics across server restarts                                                                                                                                                |
| `track_functions`           | `all`                | Required for `postgresql.function.calls` — without it, `pg_stat_user_functions` stays empty                                                                                            |

**Optional parameters**

| Parameter                          | Recommended value | Why                                                                                                                                   |
| ---------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `pg_stat_statements.track_utility` | `off`             | Disables tracking of utility commands like `PREPARE` and `EXPLAIN`, so only queries like `SELECT`, `UPDATE`, and `DELETE` are tracked |

> #### ⚠️ IMPORTANT
>
> On RDS/Aurora, `track_activity_query_size` and `pg_stat_statements.max` are static parameters — even when applying them via a parameter group at instance creation, AWS requires `apply_method: pending-reboot` for them (immediate apply fails with `InvalidParameterCombination`). A reboot is required for these two to take effect either way.

> #### ⚠️ IMPORTANT
>
> On Aurora, the DB parameter group family name encodes the major version (for example, `aurora-postgresql14`, `aurora-postgresql16`) and must match the cluster or instance's engine version exactly — AWS rejects instance creation with `InvalidParameterCombination` if they don't match. There is no single family that works across versions.

## Next steps

Once you've verified your environment meets these prerequisites:

1.  Choose your installation method:

-   [Self-hosted setup](https://docs.newrelic.com/docs/opentelemetry/database/postgresql/hosted)
-   [AWS RDS setup](https://docs.newrelic.com/docs/opentelemetry/database/postgresql/rds)

2.  Review the [available metrics](https://docs.newrelic.com/docs/opentelemetry/database/postgresql/metrics-reference) that will be collected
3.  Check our [troubleshooting guide](https://docs.newrelic.com/docs/opentelemetry/database/postgresql/troubleshooting) for common issues
