Quick Start
Four-step process overview for using extensions
To use extensions in Pigsty, complete 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 inventory. During cluster initialization, Pigsty installs their packages and creates the extensions automatically:
Run ./pgsql.yml to initialize the cluster.
The three extensions postgis, timescaledb, and vector will then be available in the meta database.
Imperative Operations
For an existing cluster, you can use commands to add extensions:
You can also install extension packages with the pig package manager.
Then run CREATE EXTENSION in 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, see each subsection: Download, Install, Config, Create
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)