PostgreSQL Extensions

This page describes how to work with PostgreSQL extensions on Thalassa Cloud DBaaS: which extensions are pre-loaded, how to list and enable others, and how to verify what is installed in your database.

Pre-loaded extensions

The following extensions are available and autoloaded on every PostgreSQL cluster:

  • pg_stat_statements — Track query execution statistics (frequency, total time)
  • pgaudit — SQL audit logging for compliance

You can use them without running CREATE EXTENSION; they are already loaded in the cluster.

List available extensions

To see all extensions available in your instance (including those not yet installed in the current database):

SELECT name, default_version, installed_version, comment
FROM pg_available_extensions
ORDER BY name;
  • name — Use this in CREATE EXTENSION name;
  • default_version — Version installed if you enable the extension
  • installed_version — Empty if not installed in the current database; set if already installed
  • comment — Short description of the extension

List installed extensions

To see which extensions are enabled in the current database:

SELECT extname, extversion
FROM pg_extension
ORDER BY extname;

Enable an extension

To enable an extension in the current database:

CREATE EXTENSION IF NOT EXISTS <extension_name>;

Example:

CREATE EXTENSION IF NOT EXISTS pg_trgm;

Note: Extension availability and the ability to install them depend on your cluster configuration and PostgreSQL version. Some extensions require superuser or preloaded configuration (e.g. shared_preload_libraries). In managed DBaaS, installing such extensions via CREATE EXTENSION may be restricted. These extensions may still be available for your database through the Thalassa Cloud API — use the API for databases to enable them when applicable.

Remove an extension

To remove an extension from the current database:

DROP EXTENSION IF EXISTS <extension_name>;

Warning: Dropping an extension removes its objects (functions, types, operators, indexes). Ensure no application code or objects depend on it before dropping.

Featured extensions

The following extensions have dedicated documentation on Thalassa Cloud DBaaS:

  • TimescaleDB — Time-series data and optimizations (Apache-2 edition only)
  • PostGIS — Geometry and geography spatial types and functions
  • pgvector — Vector data type and similarity search (IVFFlat, HNSW)

Full list of available extensions

The table below lists extensions typically available on Thalassa Cloud PostgreSQL. Exact availability depends on your cluster and PostgreSQL version; run the query in List available extensions to see the current list for your instance.

ExtensionDescription
address_standardizerParse an address into constituent elements (geocoding address normalization)
address_standardizer-3Parse an address into constituent elements (PostGIS 3.x)
address_standardizer_data_usAddress Standardizer US dataset example
address_standardizer_data_us-3Address Standardizer US dataset example (PostGIS 3.x)
amcheckFunctions for verifying relation integrity
autoincFunctions for autoincrementing fields
bloomBloom access method — signature file based index
btree_ginSupport for indexing common datatypes in GIN
btree_gistSupport for indexing common datatypes in GiST
citextData type for case-insensitive character strings
cubeData type for multidimensional cubes
dblinkConnect to other PostgreSQL databases from within a database
dict_intText search dictionary template for integers
dict_xsynText search dictionary template for extended synonym processing
earthdistanceCalculate great-circle distances on the surface of the Earth
file_fdwForeign-data wrapper for flat file access
fuzzystrmatchDetermine similarities and distance between strings
hstoreData type for storing sets of (key, value) pairs
insert_usernameFunctions for tracking who changed a table
intaggInteger aggregator and enumerator (obsolete)
intarrayFunctions, operators, and index support for 1-D arrays of integers
isnData types for international product numbering standards
loLarge Object maintenance
ltreeData type for hierarchical tree-like structures
moddatetimeFunctions for tracking last modification time
pageinspectInspect the contents of database pages at a low level
pg_buffercacheExamine the shared buffer cache
pg_freespacemapExamine the free space map (FSM)
pg_logicalinspectFunctions to inspect logical decoding components
pg_prewarmPrewarm relation data
pg_stat_statementsTrack planning and execution statistics of all SQL statements
pg_surgeryExtension to perform surgery on a damaged relation
pg_trgmText similarity measurement and index searching based on trigrams
pg_visibilityExamine the visibility map (VM) and page-level visibility info
pg_walinspectFunctions to inspect contents of PostgreSQL Write-Ahead Log
pgauditProvides auditing functionality
pgcryptoCryptographic functions
pgrowlocksShow row-level locking information
pgstattupleShow tuple-level statistics
plpgsqlPL/pgSQL procedural language
postgisPostGIS geometry and geography spatial types and functions
postgis-3PostGIS geometry and geography spatial types and functions (3.x)
postgis_rasterPostGIS raster types and functions
postgis_raster-3PostGIS raster types and functions (3.x)
postgis_sfcgalPostGIS SFCGAL functions
postgis_sfcgal-3PostGIS SFCGAL functions (3.x)
postgis_tiger_geocoderPostGIS TIGER geocoder and reverse geocoder
postgis_tiger_geocoder-3PostGIS TIGER geocoder and reverse geocoder (3.x)
postgis_topologyPostGIS topology spatial types and functions
postgis_topology-3PostGIS topology spatial types and functions (3.x)
postgres_fdwForeign-data wrapper for remote PostgreSQL servers
refintFunctions for implementing referential integrity (obsolete)
segData type for representing line segments or floating-point intervals
sslinfoInformation about SSL certificates
tablefuncFunctions that manipulate whole tables, including crosstab
tcnTriggered change notifications
timescaledbEnables scalable inserts and complex queries for time-series data
tsm_system_rowsTABLESAMPLE method which accepts number of rows as a limit
tsm_system_timeTABLESAMPLE method which accepts time in milliseconds as a limit
unaccentText search dictionary that removes accents
uuid-osspGenerate universally unique identifiers (UUIDs)
vectorVector data type and IVFFlat and HNSW access methods (pgvector)
xml2XPath querying and XSLT

Troubleshooting

CREATE EXTENSION fails

If an extension appears in pg_available_extensions but CREATE EXTENSION fails, typical causes are:

  • Insufficient privileges (some extensions require superuser)
  • Extension or its libraries not installed for your image or version
  • Extension requires shared_preload_libraries and is not loaded

Check what is preloaded:

SELECT name, setting
FROM pg_settings
WHERE name = 'shared_preload_libraries';

For extensions that require superuser or preloaded configuration (e.g. TimescaleDB), enable them via the Thalassa Cloud API for databases when the option is available. If an extension is not available or cannot be enabled, contact Thalassa Cloud support to confirm options for your cluster.