Skip to main content

PostgreSQL PGVector extensions

You can enable extensions for PostgreSQL PGVector databases. Extensions allow you to add functionality to a database without modifying the source code of the DBMS itself.

For a list of extensions available in Managed Databases, see the table Extension descriptions.

Some extensions require enabling a shared preload library.

Some extensions depend on others: dependent extensions will not work without the primary extension. For a list of dependent and primary extensions, see the table Dependent extensions.

You can add an extension in the control panel, via the Managed Databases API, and via Terraform.

Enable shared preload libraries for extensions

Some extensions require shared libraries. To connect a library, when creating a cluster or changing settings in an existing cluster, specify its name in the shared_preload_libraries.

The PostgreSQL PGVector cluster supports the following libraries:

  • pg_cron — for the extension pg_cron;

  • pg_prewarm — for the extension pg_prewarm.

Add extension

Extensions are connected to each database separately. If you connect a dependent extension and the main extension is not connected yet, the main extension will be connected first automatically, followed by the dependent one.

  1. In the Control Panel, on the top menu, click Products and select Managed Databases.
  2. Open the tab Active.
  3. Open the cluster page → Databases tab → database card.
  4. In the Extensions block, click Add extension.
  5. Select an extension. The list of available extensions and their descriptions can be found in the table Extension description.
  6. Click Add.

Delete extension

A dependent extension can be deleted separately. To delete the main extension, delete the dependent one first. The list of dependent and main extensions can be viewed in the table Dependent extensions.

  1. In the Control Panel, on the top menu, click Products and select Managed Databases.
  2. Open the tab Active.
  3. Open the cluster page → Databases tab → database card.
  4. In the Extensions block, in the extension row, click .

Extension descriptions

address_standardizerUsed to parse postal addresses passed as a string
address_standardizer_data_usUsed to structure US and Canadian postal addresses for the address_standardizer extension
autoinc

Contains the autoinc() function. This function returns the next value for a sequence stored in an integer field. Unlike built-in types that manage sequences, autoinc():

  • blocks attempts to insert a value from the query into the field;
  • allows modifying the value in the field when updating a record
bloomAdds access to database indexes based on Bloom filters, which require significantly less memory than hash tables but allow false positives
btree_ginContains example operator classes for GIN (Generalized Inverted Index), which is used for inverted search
btree_gistContains GiST (Generalized Search Tree) operator classes. Unlike B-tree indexes, GiST supports the <> (not equal) and < - > (distance) operators, although it does not enforce uniqueness of returned values
citextContains the citext data type, which is used for case-insensitive string operations
cubeContains the cube data type, which is used for representing multidimensional cubes
dblinkSupports connecting to other PostgreSQL databases from the current session
dict_intContains an example of an add-on dictionary template for full-text search, which can be used to prevent excessive growth of unique word lists and increase search speed
dict_xsynContains an example of an add-on Extended Synonym Dictionary template for full-text search: when searching for a word, all of its synonyms will be found
fuzzystrmatchContains functions used to determine the similarities and differences between strings
h3-pg

Provides an API for H3, an open-source system for indexing geographic objects in a hexagonal grid system (tiles). Allows dividing territory into uniform tiles for geospatial data analysis, such as building heatmaps, traffic, and mobility analysis. Can be used in conjunction with PostGIS for advanced geospatial data analysis.

The extension is available for PostgreSQL PGVector versions 15 and higher

hstoreContains the hstore data type, which allows storing key-value pairs within a single table field and working with them efficiently
intarrayContains functions and operators for working with integer arrays that do not contain null (NULL) values
ip4rSupports indexing IPv4 and IPv6 addresses to improve query performance
isnContains data types for international product numbering standards: EAN13, UPC, ISBN, ISMN, and ISSN. Number validation and generation are performed based on a specified list of prefixes
jsonb_plperl

Adds support for the json and jsonb data types to the PL/Perl procedural language. Allows direct use of JSON data when writing functions and triggers in Perl

jsqueryAllows using the JsQuery language to work with jsonb data. JsQuery provides efficient searching within nested objects and includes additional comparison operators with index support
loContains the lo data type and the lo_manage() function, which are used to manage Binary Large Objects (BLOBs) in accordance with JDBC and ODBC driver specifications (the default PostgreSQL behavior does not meet them)
ltreeContains the ltree data type for representing data labels stored in a tree-like hierarchical structure
moddatetimeContains the moddatetime() function, which allows tracking the last modification time of a table row
mysql_fdw

Allows directly connecting from a PostgreSQL PGVector cluster to MySQL databases using a Foreign Data Wrapper.

To use the extension, the dbaas_admin role is required. This role is automatically granted to the database owner and cannot be assigned to other users.

The extension is available for PostgreSQL PGVector versions 15 and higher

oracle_fdw

Allows directly connecting from a PostgreSQL PGVector cluster to Oracle databases using a Foreign Data Wrapper.

To use the extension, the dbaas_admin role is required. This role is automatically granted to the database owner; it cannot be assigned to other users.

The extension is available for PostgreSQL PGVector version 15 or higher

pg_buffercache

Allows monitoring the state of the shared buffer cache in real time.

To use the extension, the dbaas_admin role is required. This role is automatically granted to the database owner and cannot be assigned to other users.

The extension is available for PostgreSQL PGVector versions 15 and higher

pg_clickhouse

Allows directly connecting from a PostgreSQL PGVector cluster to ClickHouse databases using a Foreign Data Wrapper.

To use the extension, the dbaas_admin role is required. This role is automatically granted to the database owner; it cannot be assigned to other users.

The extension is available for PostgreSQL PGVector version 15 or higher

pg_cron

Allows you to run scheduled SQL queries inside the database.

Requires connecting the shared library pg_cron.

The extension can be connected to only one database in a cluster. To connect the extension to another database, delete it from the current one first.

Enabling the extension will restart the cluster.

To use the extension, the dbaas_admin role is required. This role is automatically granted to the database owner; it cannot be assigned to other users.

The extension is available for PostgreSQL PGVector version 15 or higher

pg_prewarm

Allows you to load relation data into the operating system cache or the PostgreSQL buffer cache.

Requires connecting the shared library pg_prewarm.

Enabling the extension will restart the cluster.

The extension is available for PostgreSQL PGVector version 15 or higher

pg_repack

Allows you to reorganize tables and indexes without locks to reduce their size and fragmentation.

To use the extension, the dbaas_admin role is required. This role is automatically granted to the database owner; it cannot be assigned to other users

pg_stat_statements

Adds the ability to track planning and collect execution statistics for all SQL queries executed in the cluster.

To use the extension, the dbaas_admin role is required. This role is automatically granted to the database owner; it cannot be assigned to other users

pg_trgm

Contains tools for fast similarity search of strings based on trigram matching.

The extension is available for PostgreSQL PGVector version 15 or higher

pg_uuidv7

Contains functions for generating UUID version 7.

The extension is available for PostgreSQL PGVector version 15 or higher

pgcryptoProvides a set of cryptographic functions for data protection. For more information about data encryption using the pgcrypto extension and usage examples, see the Data encryption
pgrowlocksContains the pgrowlocks() function, which returns information about row-level locks on a specified table
pgstattuple

Provides detailed disk space usage statistics and allows analyzing index bloat, the number of "dead" tuples, and free space. The extension is useful for performance diagnostics, index optimization, scheduling VACUUM operations, and using the extension pg_repack

pgTAPProvides a set of tools for testing database schemas and SQL functions
pgvectorAllows working with vector data — storing, indexing, and querying
plpgsql

Allows you to use the PL/pgSQL procedural language to create functions, procedures, and triggers. The extension is enabled by default and automatically available in all databases created in the cluster. You do not need to enable it separately in the control panel

plv8Allows you to use JavaScript to write stored procedures and triggers
postgis

Allows you to store and process geographic information system (GIS) objects in PostgreSQL databases.

To use the extension, you need the dbaas_admin role. This role is automatically granted to the database owner and cannot be assigned to other users

postgis_rasterAllows you to work with raster images and analyze geographic information system (GIS) objects in databases
postgres_fdw

Allows direct access from a PostgreSQL PGVector cluster to data stored on external PostgreSQL servers (other clusters) using Foreign Data Wrapper.

To use the extension, you need the dbaas_admin role. This role is automatically granted to the database owner and cannot be assigned to other users

prefixAllows you to use prefixes and masks to optimize queries
rumAdds an access method for working with RUM indexes
segContains the seg data type for representing line segments or floating-point intervals
tablefuncContains a set of functions that return tables (sets of rows)
tcn

Provides a trigger function to notify about changes in tables to which the trigger is attached.

The extension is available for PostgreSQL PGVector version 15 and higher

tsm_system_rows

Provides a sampling method by number of rows (SYSTEM_ROWS), which can be used in the TABLESAMPLE clause of the SELECT.

The extension is available for PostgreSQL PGVector version 15 and higher

tsm_system_time

Provides a sampling method by execution time (SYSTEM_TIME), which can be used in the TABLESAMPLE clause of the SELECT.

The extension is available for PostgreSQL PGVector version 15 and higher

unaccentContains a dictionary for accent-insensitive text search
uuid-osspContains functions for generating UUIDs using standard algorithms
xml2Allows you to use XPath queries and XSLT

Dependent extensions

earthdistanceContains a module for calculating distances between points on the surface of the Earth. Works only together with the main extension cube
pg_stat_kcache

Adds the ability to collect statistics on read and write operations performed at the file system level. Works only together with the main extension pg_stat_statements.

To use the extension, the dbaas_admin role is required. This role is automatically granted to the database owner; it cannot be assigned to other users

pgroutingContains functions for geospatial routing of the PostGIS database. Works only together with the main extension postgis
postgis_tiger_geocoderContains functions for geocoding based on data in the TIGER format. Works only together with the main extension postgis
postgis_topology

Contains data types and functions of the postgis extension for managing topological objects. Works only together with the main extension postgis.

To use the extension, the dbaas_admin role is required. This role is automatically granted to the database owner; it cannot be assigned to other users