Available in VPC
You can manage the extensions of the created PostgreSQL. When you change an extension, it may be applied to the whole service or selected database, depending on the type of extension. For some extensions, DB Server restarts automatically when you change them.
Install extensions
To install an extension:
- In the VPC environment of the NAVER Cloud Platform console, navigate to Menu > Services > Database > Cloud DB for PostgreSQL.
- Click the DB Server menu.
- Click the PostgreSQL server you want to manage, and click [Manage DB].
- Click [View DB Server details].
- When the View DB service details interface appears, select the Manage extensions tab.

- Select the extension to install from the Extension Name dropdown list.
- Select the database to install from the Database Name dropdown list.
- In case of selecting an extension that is applied to all database, such as "passwordcheck," the Database Name dropdown list is disabled.
- cdb_admin schema is created to the installed database separately, and the selected extension is installed.
- Click [Install].
- DB server restart popup appears if the DB server needs to be restarted.

- Install extensions popup appears if the DB server does not need to be restarted.

- DB server restart popup appears if the DB server needs to be restarted.
- Check the information on the popup, and click [Install].
Set extensions
The procedure for changing extension settings is the same as that for changing DB config settings. For more information, see Manage DB config.
If the set config values are not appropriate, the extension may not operate properly. Make sure to fully understand the action of the config variable before setting the extension.
Delete extensions
To delete an extension:
-
In the VPC environment of the NAVER Cloud Platform console, navigate to Menu > Services > Database > Cloud DB for PostgreSQL.
-
Click the DB Server menu.
-
Click the PostgreSQL server you want to manage, and click [Manage DB].
-
Click [View DB Server details].
-
When the View DB service details interface appears, select the Manage extensions tab.
-
Click [Delete] to the right of the extension you want to delete on the extension management interface.
- Delete extensions popup appears if the DB server does not need to be restarted.

- Delete extensions and DB server restart popup appear if the DB server needs to be restarted.

- Delete extensions popup appears if the DB server does not need to be restarted.
-
Read the information on the popup, check the "Checked" box, and click [Delete].
Use extensions
To use an extension:
Use extensions: Extensions installed through the console
- You can install the extensions that require superuser permission only through the console.
- Such extensions provide "cdb_admin," a separate schema, and are installed under the applicable schema.
- After installation, add "cdb_admin" schema to the search_path at the session level or use it in the cdb_admin.{extension_object} format explicitly.
The following example shows how to use search_path:
show search_path;
set search_path = "$user", public, cdb_admin;
create table cdb_test (val vector(3));
select userid from pg_stat_statements limit 1;
The following example shows how to use it explicitly:
create table cdb_test (val cdb_admin.vector(3));
select userid from cdb_admin.pg_stat_statements limit 1;
List of supported extensions
The following is the list of extensions supported in the Cloud DB for PostgreSQL service of NAVER Cloud Platform.
The following extensions can be installed from the NAVER Cloud Platform console:
| Extension name | Description | Need to restart | Installation range | Official website |
|---|---|---|---|---|
| pgvector | Provides types and calculation for the vector. | O | Database | https://github.com/pgvector/pgvector |
| pg_stat_statements | Provides analytics on the performed SQL statements. | X | Database | https://www.postgresql.org/docs/current/pgstatstatements.html |
| passwordcheck | When performing create role or alter role, checks user's password and returns an error if it is vulnerable. | O | All services | https://www.postgresql.org/docs/current/passwordcheck.html |
| postgres_fdw | Foreign Data Wrapper (FDW), which allows you to query and manipulate tables from another PostgreSQL Server as if they were external tables. | X | Database | https://www.postgresql.org/docs/current/postgres-fdw.html |
| PostGIS | Provide storage, indexing, and querying of geospatial data. | O | Database | https://postgis.net |
| pg_cron | Schedules recurring tasks (jobs) in PostgreSQL using cron syntax. | O | Database | https://github.com/citusdata/pg_cron |
- Extensions displayed as "Need to restart" automatically restart when they are installed for the first time or deleted for the last time at the service level.
- PostGIS is supported only on Rocky Linux and PostgreSQL version 14 or higher.
You can install the following extensions directly. Because the extensions available for manual installation do not require superuser permissions, you can install them directly.
- btree_gin
- btree_gist
- citext
- cube
- dict_int
- fuzzystrmatch
- hstore
- intarray
- isn
- lo
- ltree
- pg_trgm
- pgcrypto
- seg
- tablefunc
- tcn
- tsm_system_rows
- tsm_system_time
- unaccent
- uuid-ossp
To create an extension manually:
psql -h {ip} -p {port} -d {db name} -U {user name}
create extension "uuid-ossp" with {schema name};