Quick Start
Four-step process overview for using extensions
Using extensions in Pigsty requires four steps: Download, Install, Config, and Create.
- Download: Download extension packages to the local repository (the default local repository only guarantees the base kernel and
pgsql-mainpackage set) - Install: Install extension packages on cluster nodes
- Config: Some extensions need to be preloaded or configured with parameters
- Create: Execute
CREATE EXTENSIONin the database to create the extension
Declarative Configuration
Declare extensions in the Pigsty configuration manifest, and they will be automatically installed and created during cluster initialization:
After executing ./pgsql.yml to initialize the cluster, the three extensions postgis, timescaledb, and vector will be available in the meta database.
Imperative Operations
For existing clusters, you can add extensions using command-line methods:
You can also use the pig package manager to install extension packages, then run CREATE EXTENSION inside the database:
Process Quick Reference
| Step | Parameter/Command | Description |
|---|---|---|
| Download | repo_extra_packages | Specify extension packages to download to local repository |
| Install | pg_extensions | Specify extension packages to install on cluster |
| Config | pg_libs | Preload extensions to shared_preload_libraries |
| Create | pg_databases.extensions | Automatically execute CREATE EXTENSION in database |
For detailed instructions, please refer to each subsection: Download, Install, Config, Create
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)