Extension management
This topic describes how to manage extensions for ApsaraDB RDS for PostgreSQL in the ApsaraDB RDS console, including how to filter, install, uninstall, upgrade, and apply them to other databases.
Prerequisites
-
The major engine version is PostgreSQL 10 or later.
-
The minor engine version of the instance is 20230330 or later. For information about how to view and upgrade the minor engine version, see Upgrade the minor engine version.
-
The instance is a primary instance that uses ESSD or Premium ESSD.
-
The instance has at least one privileged account and one database. To create a privileged account and a database, see Create an account and a database.
Usage notes
-
Your instance automatically restarts when you install an extension that requires preloading through the
shared_preload_librariesparameter and is not already included in the parameter's value.NoteOn the Parameters page, you can check the
shared_preload_librariesparameter to see if an extension requires preloading and is already included in its value. -
The
pg_cronextension depends on thecron.database_nameparameter. Changes to this parameter take effect only after the instance restarts. When you installpg_cronin a destination database, the system setscron.database_nameto that database. Therefore, the installation restarts your instance even ifpg_cronis already included in the value of theshared_preload_librariesparameter. Installpg_cronduring off-peak hours. -
GanosBase and PostGIS extensions cannot be installed in the same schema.
-
To install the following extensions, the account for the destination database must be a privileged account. Otherwise, the installation fails.
ganos_geometry_topology,ganos_tiger_geocoder,postgis_tiger_geocoder, andpostgis_topology. -
Proceed with caution when you uninstall an extension. This operation may cause data loss or service interruptions.
Procedure
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
-
In the navigation pane on the left, click Plug-ins.
-
On the Extension Marketplace tab, you can view and install popular extensions and request new extensions as needed.
-
Click Install for the target extension to install it in the destination database.
-
If you want to use an open-source PostgreSQL extension that is not yet available in the Extension Marketplace, click Request New Extension and provide the official download URL for the extension. After the extension is adapted for ApsaraDB RDS for PostgreSQL, you can use it.
-
-
On the Extension Management tab, select a database by name to manage its extensions.
-
Filter extensions
Use Filter by extension to filter extensions by feature. You can select multiple features.
-
Install extensions
On the Uninstalled Extensions tab, find the target extension and click Install in the Actions column.
You can also select multiple extensions to batch install them.
-
Uninstall extensions
On the Installed Extensions tab, find the target extension and click Uninstall in the Actions column.
You can also select multiple extensions to batch uninstall them.
ImportantProceed with caution when you uninstall an extension. This operation may cause data loss or service interruptions.
-
Upgrade extensions
On the Installed Extensions tab, find the target extension and click Upgrade Version in the Actions column.
NoteIf the Actions column for an extension does not display the Upgrade Version button, the extension is up to date.
-
Apply extensions to other databases
On the Installed Extensions tab, click Apply to Other Databases to install all extensions from the current database to other databases.
-
-
FAQ
Q: How do I install an extension that my instance supports but that is not displayed in the Extension Marketplace?
A: If the Extension Marketplace tab does not display an extension that your instance already supports (for example, the postgis extension for PostgreSQL 18), you can connect to the instance by using DMS or psql and run the following command to install the extension:
CREATE EXTENSION IF NOT EXISTS postgis;
API reference
|
API |
Description |
|
Installs one or more specified extensions in a destination database. Note
If an extension is not created after you call this API operation, check whether the major engine version of your instance supports the extension. For more information, see Supported extensions for ApsaraDB RDS for PostgreSQL. |
|
|
Queries information about all extensions in a specified database on an instance. |
|
|
Upgrades a specified extension in a destination database. |
|
|
Deletes a specified extension from a destination database. |