Supported PostgreSQL extension versions - Amazon Relational Database Service

Supported PostgreSQL extension versions

RDS for PostgreSQL supports many PostgreSQL extensions. The PostgreSQL community sometimes refers to these as modules. Extensions expand on the functionality provided by the PostgreSQL engine. You can find a list of extensions supported by Amazon RDS in the default DB parameter group for that PostgreSQL version. You can also see the current extensions list using psql by showing the rds.extensions parameter as in the following example.

SHOW rds.extensions;
Note

Parameters added in a minor version release might display inaccurately when using the rds.extensions parameter in psql.

As of RDS for PostgreSQL 13, certain extensions can be installed by database users other than the rds_superuser. These are known as trusted extensions. To learn more, see PostgreSQL trusted extensions.

Certain versions of RDS for PostgreSQL support the rds.allowed_extensions parameter. This parameter lets an rds_superuser limit the extensions that can be installed in the RDS for PostgreSQL DB instance. For more information, see Restricting installation of PostgreSQL extensions.

For lists of PostgreSQL extensions and versions that are supported by each available RDS for PostgreSQL version, see PostgreSQL extensions supported on Amazon RDS in Amazon RDS for PostgreSQL Release Notes.

Restricting installation of PostgreSQL extensions

You can restrict which extensions can be installed on a PostgreSQL DB instance. By default, this parameter isn't set, so any supported extension can be added if the user has permissions to do so. To do so, set the rds.allowed_extensions parameter to a string of comma-separated extension names. By adding a list of extensions to this parameter, you explicitly identify the extensions that your RDS for PostgreSQL DB instance can use. Only these extensions can then be installed in the PostgreSQL DB instance.

The default string for the rds.allowed_extensions parameter is '*', which means that any extension available for the engine version can be installed. Changing the rds.allowed_extensions parameter does not require a database restart because it's a dynamic parameter.

The PostgreSQL DB instance engine must be one of the following versions for you to use the rds.allowed_extensions parameter:

  • All PostgreSQL 16 versions

  • PostgreSQL 15 and all higher versions

  • PostgreSQL 14 and all higher versions

  • PostgreSQL 13.3 and higher minor versions

  • PostgreSQL 12.7 and higher minor versions

To see which extension installations are allowed, use the following psql command.

postgres=> SHOW rds.allowed_extensions; rds.allowed_extensions ------------------------ *

If an extension was installed prior to it being left out of the list in the rds.allowed_extensions parameter, the extension can still be used normally, and commands such as ALTER EXTENSION and DROP EXTENSION will continue to work. However, after an extension is restricted, CREATE EXTENSION commands for the restricted extension will fail.

Installation of extension dependencies with CREATE EXTENSION CASCADE are also restricted. The extension and its dependencies must be specified in rds.allowed_extensions. If an extension dependency installation fails, the entire CREATE EXTENSION CASCADE statement will fail.

If an extension is not included with the rds.allowed_extensions parameter, you will see an error such as the following if you try to install it.

ERROR: permission denied to create extension "extension-name" HINT: This extension is not specified in "rds.allowed_extensions".

PostgreSQL trusted extensions

To install most PostgreSQL extensions requires rds_superuser privileges. PostgreSQL 13 introduced trusted extensions, which reduce the need to grant rds_superuser privileges to regular users. With this feature, users can install many extensions if they have the CREATE privilege on the current database instead of requiring the rds_superuser role. For more information, see the SQL CREATE EXTENSION command in the PostgreSQL documentation.

The following lists the extensions that can be installed by a user who has the CREATE privilege on the current database and do not require the rds_superuser role:

For lists of PostgreSQL extensions and versions that are supported by each available RDS for PostgreSQL version, see PostgreSQL extensions supported on Amazon RDS in Amazon RDS for PostgreSQL Release Notes.