Install Postgres extensions
Extensions add features to Postgres, such as vector search with pgvector or geospatial types with PostGIS. When you install one, Orchard runs CREATE EXTENSION against the database for you. Only extensions on an allowlist are available, because some extensions can run code or reach the network from the database pod.
Install an extension
Section titled “Install an extension”- Open the database.
- Go to Settings > Extensions.
- Find the extension.
- Turn on its switch.
An extension that loads at startup shows Loads at startup, restarts the database. Installing one of these restarts the database and drops open connections.
orchard db extension list <id>orchard db extension install <id> vectorFor an extension that loads at startup, add --preload. This option restarts the database.
Remove an extension
Section titled “Remove an extension”- Open the database.
- Go to Settings > Extensions.
- Turn off the extension’s switch.
- Select Drop extension, or Drop and restart for an extension that loads at startup.
orchard db extension uninstall <id> vectorFor an extension that loads at startup, add --remove-preload. This option restarts the database.
Allowed extensions
Section titled “Allowed extensions”Orchard allows the following extensions. It refuses others, because untrusted languages and foreign data wrappers can run code or reach the network from the database pod.
| Purpose | Extensions |
|---|---|
| UUIDs and hashing | uuid-ossp, pgcrypto |
| Vectors | vector, pgvector |
| Geospatial | postgis, postgis_topology, postgis_raster, cube, earthdistance |
| Text search | pg_trgm, unaccent, fuzzystrmatch, citext |
| Data types | hstore, ltree, isn, intarray |
| Indexes | btree_gin, btree_gist |
| Query statistics | pg_stat_statements |
| Other | tablefunc, plpgsql, timescaledb |
An extension must also exist in the Postgres image. If you need one that is missing, an operator must change the image.
Related resources
Section titled “Related resources”- Monitor a database - Turn on
pg_stat_statementsfrom the Queries view to find slow queries. orchard db extensionreference - Review the extension commands and their flags.