Create
After you install extension packages, run CREATE EXTENSION in the database to use their features.
View Available Extensions
After you install extension packages, run these queries to show the available extensions:
Create Extensions
Use CREATE EXTENSION to enable extensions in the database:
Note:
CREATE EXTENSIONuses the extension name (e.g.,vector), not the package alias (pgvector).
Create During Cluster Initialization
Declare extensions in pg_databases.
Pigsty creates them during cluster initialization:
After it creates the database, Pigsty runs CREATE EXTENSION automatically.
Extensions Requiring Preload
Some extensions require preloading before creation.
Add them to shared_preload_libraries, then restart PostgreSQL:
If you create such an extension without preloading it, PostgreSQL returns an error.
Common extensions requiring preload: timescaledb, citus, pg_cron, pg_net, pgaudit, etc. See Configure Extensions.
Extension Dependencies
Some extensions depend on other extensions. Create the dependencies first:
Extensions Not Requiring Creation
A few extensions have no SQL interfaces and do not require CREATE EXTENSION:
| Extension | Description |
|---|---|
wal2json | Logical decoding plugin, used directly in replication slots |
decoderbufs | Logical decoding plugin |
decoder_raw | Logical decoding plugin |
You can use these extensions immediately after installation. For example:
View Extension Information
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)