Skip to main content

PostgreSQL TimescaleDB Extensions

You can enable extensions for PostgreSQL TimescaleDB 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 TimescaleDB 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
clickhouse_fdw

Allows connecting directly from the PostgreSQL TimescaleDB cluster to ClickHouse databases using 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 TimescaleDB versions 15, 16, and 17.

cubeContains the cube data type, which is used to represent multi-dimensional cubes
dblinkSupports connecting to other PostgreSQL databases from the current session
dict_intContains an example add-on dictionary template for full-text search that helps prevent the growth of the unique word list and improves search speed
dict_xsynContains an example add-on template for an extended synonym dictionary (Extended Synonym Dictionary) for full-text search: searching for a word will find all of its synonyms
fuzzystrmatchContains functions used to determine similarity and distance between strings
h3-pg

Provides an API to H3, an open-source indexing system for geographic objects in a hexagonal grid system. Allows dividing a territory into identical tiles for geospatial data analysis, such as generating heatmaps, analyzing traffic and mobility. Can be used together with PostGIS for advanced spatial analysis.

The extension is available for PostgreSQL TimescaleDB version 15 or higher

hstoreContains the hstore data type, which allows storing key/value pairs in a single table field and working with them efficiently
intarrayContains functions and operators for working with integer arrays that do not contain empty (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 based on a predefined list of prefixes
jsonb_plperl

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

jsqueryAllows using the JsQuery language to work with jsonb data. JsQuery enables efficient searches in nested objects and provides additional comparison operators with index support
loContains the lo data type and the lo_manage() function, which are used to manage large binary objects (BLOBs) according to JDBC and ODBC driver specifications (the default PostgreSQL behavior does not match them)
ltreeContains the ltree data type for representing labels of data stored in a tree-like hierarchical structure
moddatetimeContains the moddatetime() function, which tracks the last modification time of a table row
mysql_fdw

Allows connecting directly from the PostgreSQL TimescaleDB cluster to MySQL databases using 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 TimescaleDB version 15 or higher

oracle_fdw

Allows connecting directly from the PostgreSQL TimescaleDB cluster to Oracle databases using 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 TimescaleDB version 15 or higher

pg_buffercache

Allows you to examine the shared buffer cache state in real time.

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 TimescaleDB 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 TimescaleDB 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 TimescaleDB 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 TimescaleDB version 15 or higher

pg_uuidv7

Contains functions for generating UUID version 7.

The extension is available for PostgreSQL TimescaleDB 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
plpgsql

Allows using 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, the dbaas_admin role is required. This role is automatically granted to the database owner; it 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 accessing data stored on external PostgreSQL servers (other clusters) directly from the PostgreSQL TimescaleDB cluster using 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

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 generate notifications about changes in tables to which the trigger is attached.

The extension is available for PostgreSQL TimescaleDB version 15 or higher

tsm_system_rows

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

The extension is available for PostgreSQL TimescaleDB version 15 or higher

tsm_system_time

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

The extension is available for PostgreSQL TimescaleDB version 15 or higher

unaccentContains a dictionary for accent-insensitive text search
uuid-osspContains functions for generating UUIDs using standard algorithms
vectorAllows you to work with vector data: store, index, and query
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