How to set up PostgreSQL extensions on preview environments
Last updated: February 4, 2026
Set up PostgreSQL Extensions
To enable PostgreSQL extensions on your preview environments, follow these steps:
Identify the extensions you need to install (such as uuid-ossp, pg_trgm, btree_gin, vector, plpgsql)
Use the SQL command
CREATE EXTENSION IF NOT EXISTS <extension-name>to install each extensionSet up the extension installation as an initial job for your preview environment
Configure the initial job to run automatically when the preview environment is created
Test the setup by creating a new preview environment and verifying the extensions are available
Usage
Once configured as an initial job, the PostgreSQL extensions will be automatically installed every time a new preview environment is created. This ensures consistency across all your preview environments and eliminates the need to manually install extensions each time.