tencent cloud

Creating a Plugin in TencentDB for PostgreSQL Instance
Last updated:2025-08-14 17:04:48
Creating a Plugin in TencentDB for PostgreSQL Instance
Last updated: 2025-08-14 17:04:48
This document describes how to create a plugin in a TencentDB for PostgreSQL instance.

Prerequisites

The TencentDB for PostgreSQL instance has been created. For specific steps, see Creating TencentDB for PostgreSQL Instance.

Operation Steps

Querying Plugin Support and Supported Versions

Method One: Query Document

The supported plugins and versions vary across different major versions of instances. You can query them in the Overview.

Method Two: Database Query

Log in to the TencentDB for PostgreSQL console and execute the following statement to query supported versions of plugins. This example uses a database instance of major version 17 to create a vector plug-in.
SELECT * FROM pg_available_extensions WHERE name = 'vector';
The returned results are as follows. Among them, the default_version column shows the plugin versions supported for installation. The vector plugin supports version 0.8.0.


2. Modify Parameters (Optional)

Creating some plug-ins requires adding values to the shared_preload_libraries parameter in advance. You can log in to the TencentDB for PostgreSQL console, click Instance ID, then enter the parameter setting webpage, search for the shared_preload_libraries parameter, and click

to modify it.
Note:
**Note:** After editing and saving shared_preload_libraries, the instance will restart to modify parameters. The specific time depends on business conditions. Ensure your application has an automatic reconnection feature.
If the selectable parameter values of shared_preload_libraries do not include the plugin you need to create, but you find the plugin information in Procedure 1, you do not need to modify the parameter value and can directly create the plugin.

Select the plug-in you need and click

to save. In this example, the vector plug-in is not included in the shared_preload_libraries parameter value, so you only need to create it directly.


Creating a Plugin

Log in to the database instance and execute the following statement in the database that requires the use of the plug-in:
CREATE EXTENSION vector;
Note:
Warning: Please try to avoid creating plugins in the postgres system database to avoid potential security risks.
After execution, confirm it by viewing the following statement to check whether creation succeeded.
SELECT * FROM pg_available_extensions WHERE name = 'vector';
The installed_version matches the default_version, indicating the add-on creation was successful.

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback