---
title: "Manage Extensions"
description: "List, install, update and remove PostgreSQL extensions on Managed PostgreSQL, and know which ones avnadmin cannot create."
url: https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/manage-extensions/
product: "PostgreSQL"
section: product
last_updated: 2026-11-10
---
> For AI agents: the documentation index is at https://community.exoscale.com/llms.txt. Every page is available as markdown at `<page URL>index.md` or with `Accept: text/markdown`.

# Manage Extensions

List the PostgreSQL extensions your Managed PostgreSQL service offers, create them in the databases that need them, update them and remove them.

## Before You Start

Open a `psql` session as `avnadmin`, connected to the database where you want the extension. See
[Connect with psql](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/connect-with-psql/index.md).
Extensions are managed with SQL only: there is no API endpoint or `exo` command for them.

## List What Is Available

Extensions the server offers, with the version `CREATE EXTENSION` installs:

```sql
SELECT name, default_version, installed_version, comment
FROM pg_available_extensions
ORDER BY name;
```

Versions an extension can be created at or updated to:

```sql
SELECT name, version, superuser, trusted, requires
FROM pg_available_extension_versions
WHERE name = 'vector'
ORDER BY version;
```

On PostgreSQL 18, `avnadmin` can create every extension in `pg_available_extensions` except
`file_fdw`. On older major versions, more are refused. The lists per version are in
[Supported extensions](https://community.exoscale.com/product/dbaas/service-specific/postgresql/reference/supported-extensions/index.md)
and [Extension versions](https://community.exoscale.com/product/dbaas/service-specific/postgresql/reference/extension-versions/index.md).
To know whether an extension works on your service, create it, see
[What You Cannot Install](#what-you-cannot-install).

## Create an Extension

A new database only has `plpgsql`. Create other extensions explicitly:

```sql
CREATE EXTENSION pg_stat_statements;
```

Extensions belong to a database. `CREATE EXTENSION` in `defaultdb` does nothing for another
database: run it in every database that needs the extension, including databases created later.

When an extension depends on others, add `CASCADE` to create them too. Without it, the statement
fails with `required extension "..." is not installed`:

```sql
CREATE EXTENSION vectorscale CASCADE;
```

Use the SQL name, which differs from the project name for a few extensions:

| Project | Name in `CREATE EXTENSION` |
| --- | --- |
| pgvector | `vector` |
| pgvectorscale | `vectorscale` |
| PostgreSQL Anonymizer | `anon` |
| PostGIS TIGER geocoder | `postgis_tiger_geocoder` |

### Extensions with a Specific Schema

Most extensions install into `public`. Some use their own schema: `aiven_extras` installs into
`aiven_extras`, `pg_cron` is registered in `pg_catalog` with its objects in `cron`,
`postgis_topology` uses `topology`, `postgis_tiger_geocoder` uses `tiger`.

`pg_partman` installs into the current schema unless you name one, and cannot be moved later
(`extension "pg_partman" does not support SET SCHEMA`). Create its schema first:

```sql
CREATE SCHEMA partman;
CREATE EXTENSION pg_partman SCHEMA partman;
```

See [Use pg_partman](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/use-pg-partman/index.md).

### Ownership

Extensions that a database owner may create (trusted extensions, such as `pgcrypto` or `anon`)
are owned by `avnadmin`. The others are created on your behalf by the platform and owned by
`postgres`. `avnadmin` can still update and drop both kinds.

## Check What Is Installed

```sql
SELECT e.extname, e.extversion, n.nspname AS schema
FROM pg_extension e
JOIN pg_namespace n ON n.oid = e.extnamespace
ORDER BY 1;
```

The psql meta-command `\dx` shows the same list with descriptions.

## Update an Extension

An installed extension keeps its version until you update it. Compare `installed_version` with
`default_version` in `pg_available_extensions`, then:

```sql
ALTER EXTENSION pg_stat_statements UPDATE;
```

Without a target, the extension moves to `default_version`. To move to a given version:

```sql
ALTER EXTENSION pg_stat_statements UPDATE TO '1.11';
```

When no update path leads to the version you name, the statement fails with
`has no update path from version "..." to version "..."`.

> [!TIP]
> To try an update on a copy first, create a new service from a point in time, run the update
> there and test your application against it. See
> [Fork a service](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/fork-a-service/index.md).

## Remove an Extension

```sql
DROP EXTENSION pg_stat_statements;
```

When objects depend on the extension, the statement fails and lists them, for example the
columns of type `geometry` for `postgis`:

```text
ERROR:  cannot drop extension postgis because other objects depend on it
DETAIL:  column geom of table regions depends on type geometry
```

`DROP EXTENSION ... CASCADE` drops those objects as well, data included. Read the list first.

## What You Cannot Install

On PostgreSQL 18:

- `file_fdw`: refused with `ERROR: file_fdw extension not allowed`.
- `pg_cron`: only in `defaultdb`. Elsewhere, `ERROR: can only create extension in database
  defaultdb`. See [Use pg_cron](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/use-pg-cron/index.md).
- `amcheck`, `pageinspect`, `pg_logicalinspect`, `pg_surgery`, `pg_walinspect`: they install,
  but their functions fail with `permission denied for function ...` as `avnadmin`.
- `pg_stat_monitor`, `pg_stat_plans`: they install, but their modules are not loaded, so their
  views fail. Use `pg_stat_statements`.
- Untrusted languages such as `plpython3u` and `plperlu`, and `postgis_legacy`: not offered,
  `CREATE EXTENSION` fails with `extension "..." is not available`.

On PostgreSQL 17 and older, several more extensions are refused with
`permission denied to create extension`, for example `amcheck`, `pageinspect`,
`pg_freespacemap` and `pg_visibility`. Check the extensions you need before choosing an older
version.

You cannot load your own extension binaries onto the service.

## Related Pages

- [The extension model](https://community.exoscale.com/product/dbaas/service-specific/postgresql/overview/extensions/index.md)
- [Supported extensions](https://community.exoscale.com/product/dbaas/service-specific/postgresql/reference/supported-extensions/index.md)
- [Extension versions](https://community.exoscale.com/product/dbaas/service-specific/postgresql/reference/extension-versions/index.md)
- [Limits and Quotas](https://community.exoscale.com/product/dbaas/service-specific/postgresql/service-boundaries/limits-and-quotas/index.md)
- [Manage users and databases](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/manage-users-and-databases/index.md)

