Create
After installing extension packages, you need to execute CREATE EXTENSION in the database to use extension features.
View Available Extensions
After installing extension packages, you can view available extensions:
Create Extensions
Use CREATE EXTENSION to enable extensions in the database:
CREATE EXTENSION uses the extension name (for example, vector), not the package alias (pgvector).
Create During Cluster Initialization
Declare extensions in pg_databases, and they will be automatically created during cluster initialization:
Pigsty will automatically execute CREATE EXTENSION after database creation.
Extensions Requiring Preload
Some extensions must be added to shared_preload_libraries and restarted before creation:
If you try to create without preloading, you will receive an error message.
Common extensions requiring preload: timescaledb, citus, pg_cron, pg_net, pgaudit, etc. See Configure Extensions.
Extension Dependencies
Some extensions depend on other extensions and need to be created in order:
Extensions Not Requiring Creation
A few extensions don’t provide SQL interfaces and don’t need CREATE EXTENSION:
| Extension | Description |
|---|---|
wal2json |
Logical decoding plugin, used directly in replication slots |
decoderbufs |
Logical decoding plugin |
decoder_raw |
Logical decoding plugin |
These extensions can be used immediately after installation, for example: