This topic describes how to manage extensions, such as installing, updating, and uninstalling extensions, in the AnalyticDB for PostgreSQL console.
Prerequisites
An AnalyticDB for PostgreSQL instance is in the Running state.
Go to the Extensions page
Log on to the AnalyticDB for PostgreSQL console.
In the upper-left corner of the console, select a region. On the Instances page, select the AnalyticDB for PostgreSQL instance whose extensions you want to manage and click the ID of the instance.
In the left-side navigation pane, click Extensions to go to the Extensions page.
Install extensions
AnalyticDB for PostgreSQL allows you to install extensions in the console (recommended) or by submitting a ticket.
If you fail to find the extension that you want to install on the Extensions page, submit a ticket.
Install a single extension
On the Extensions page, find the extension that you want to install and click Install in the Actions column.
In the Install Extension dialog box, select the database, multiple databases, or all databases in which you want to install the extension and click Install.
After the status of the AnalyticDB for PostgreSQL instance changes from Installing Extension to Running within 1 minute to 5 minutes, check whether the status of the extension changes to Installed.
Batch install extensions
In the upper-left corner of the Extensions page, click Batch Install.
In the Batch Install Extensions dialog box, select the extensions that you want to install, select the database, multiple databases, or all databases in which you want to install the extensions, and then click Install.
After the status of the AnalyticDB for PostgreSQL instance changes from Installing Extension to Running within 1 minute to 5 minutes, check whether the status of the extension changes to Installed.
After you install the following extensions, the AnalyticDB for PostgreSQL instance automatically restarts to allow the extensions to take effect. During the restart, you cannot perform read or write operations on the AnalyticDB for PostgreSQL instance:
pg_hint_plan
pg_stat_statements
Uninstall an extension
AnalyticDB for PostgreSQL allows you to uninstall extensions in the console (recommended) or by submitting a ticket.
If you fail to find the extension that you want to uninstall on the Extensions page, submit a ticket.
To uninstall an extension on the Extensions page, perform the following steps:
On the Extensions page, find the extension that you want to uninstall and click Uninstall in the Actions column.
In the Uninstall Extension dialog box, select the database or multiple databases from which you want to uninstall the extension and click Uninstall.
Check whether the extension is uninstalled on the Extensions page.
When you uninstall extensions, data loss or service unavailability may occur. Proceed with caution.
Update an extension
If the current minor version of the AnalyticDB for PostgreSQL instance supports higher versions of extensions, you can update the extensions. On the Extensions page, find the extension that you want to update and click Update in the Actions column.
If Update is not displayed in the Actions column of an extension, the extension is running the latest version.
We recommend that you update extensions during off-peak hours.
Common errors and troubleshooting
ERROR: permission denied to create extension "uuid-ossp"
Cause: The uuid-ossp extension cannot be installed by executing the CREATE EXTENSION statement.
Solution: Install the extension on the Extensions page in the AnalyticDB for PostgreSQL console.