Package Alias
PostgreSQL package naming conventions vary significantly across different operating systems:
- EL systems (RHEL/Rocky/Alma/…) use formats like
pgvector_18,postgis36_18* - Debian/Ubuntu systems use formats like
postgresql-18-pgvector,postgresql-18-postgis-3
This difference adds cognitive burden to users: you need to remember different package name rules for different systems, and handle the embedding of PostgreSQL version numbers.
Package Alias
Pigsty solves this problem through the Package Alias mechanism: you only need to use unified aliases, and Pigsty will handle all the details:
Alias Translation
Aliases can also group a set of packages as a whole. For example, Pigsty’s default installed packages - the default value of pg_packages is:
Pigsty will query the current operating system alias list (assuming el10.x86_64) and translate it to PGSQL kernel, extensions, and toolkits:
Next, Pigsty further translates pgsql-main using the currently specified PG major version (assuming pg_version = 18):
Through this approach, Pigsty shields the complexity of packages, allowing users to simply specify the functional components they want.
Which Variables Can Use Aliases?
You can use package aliases in the following four parameters, and the aliases will be automatically converted to actual package names according to the translation process:
pg_extensions- PG extension packagespg_packages- PG kernel/base utility packagesrepo_packages- Package download parameter: packages to download to local repositoryrepo_extra_packages- Extension installation parameter: additional packages to download to local repository
Alias List
You can find the alias mapping files for each operating system and architecture in the roles/node_id/vars/ directory of the Pigsty project source code:
el10.x86_64el10.aarch64el9.x86_64el9.aarch64el8.x86_64el8.aarch64u26.x86_64u26.aarch64u24.x86_64u24.aarch64u22.x86_64u22.aarch64d13.x86_64d13.aarch64d12.x86_64d12.aarch64
How It Works
Alias Translation Process
Version Placeholder
Pigsty’s alias system uses $v as a placeholder for the PostgreSQL version number. When you specify a PostgreSQL version using pg_version, all $v in aliases will be replaced with the actual version number.
For example, when pg_version: 18:
| Alias Definition (EL) | Expanded Result |
|---|---|
postgresql$v* |
postgresql18* |
pgvector_$v* |
pgvector_18* |
timescaledb-tsl_$v* |
timescaledb-tsl_18* |
| Alias Definition (Debian/Ubuntu) | Expanded Result |
|---|---|
postgresql-$v |
postgresql-18 |
postgresql-$v-pgvector |
postgresql-18-pgvector |
postgresql-$v-timescaledb-tsl |
postgresql-18-timescaledb-tsl |
Wildcard Matching
On EL systems, many aliases use the * wildcard to match related subpackages. For example:
postgis36_18*will matchpostgis36_18,postgis36_18-client,postgis36_18-utils, etc.postgresql18*will matchpostgresql18,postgresql18-server,postgresql18-libs,postgresql18-contrib, etc.
This design ensures you don’t need to list each subpackage individually - one alias can install the complete extension.