When deploying PostgreSQL with Pigsty, repo configure is handled automatically. You don’t need to manage repositories manually.
However, if you want to use the Pigsty extension repository independently (e.g., to install 400+ additional extensions
for existing PostgreSQL deployments), this section will guide you through the process.
The PostgreSQL Global Development Group (PGDG) maintains the official YUM/APT repo for PostgreSQL.
Pigsty provides a complementary repository (similar to EPEL for RHEL) that offers additional RPM/DEB packages for PostgreSQL extensions and ecosystem tools,
maintaining full compatibility with PGDG’s build specifications.
The Pigsty extension repository supports both x86_64 and aarch64 architectures, organized into two sub-repositories:
pigsty-infra: Contains OS-version-independent infrastructure components (e.g., the Go-based vip-manager that works across different OS major version)
pigsty-pgsql: Provides OS-version-specific PostgreSQL extensions, supporting EL 8/9, Debian 12, and Ubuntu 22.04/24.04 - totaling 10 major version-architecture combinations.
For supported operating systems, we provide the pig CLI tool for repository and extension management. It handles:
Repository files are written to /etc/yum.repos.d/ (EL) or /etc/apt/sources.list.d/ (Debian/Ubuntu).
To add all repositories and update the software cache:
pig repo add all -u # Add NODE + PGSQL software repositories and update cache
To clear existing repositories and add new ones:
pig repo add all -ru # remove + updatepig repo set# Shorthand for the above command
Removed repository files are backed up to the relevant backup directory.
We recommend using this method to manage repositories, but you can also manually configure YUM/APT repositories if preferred.
2 - YUM Repo
How to use the Pigsty Extension YUM/DNF Repo on RHEL/Rocky Compatible OS?
You can use the following Shell commands to manually add the Pigsty repository GPG key, write the repository definition, and update the cache.
The default repo.pigsty.io repository is hosted on Cloudflare CDN, which may be slow for users in mainland China.
You can use the China CDN mirror site repo.pigsty.cc instead of the default repo.pigsty.io repository:
Add Repo
For EL 8/9 and compatible systems, use the following commands to add the Pigsty repository GPG key, write the repository definition, and update the cache:
# Add Pigsty's GPG public key to your system keychain to verify package signaturescurl -fsSL https://repo.pigsty.io/key | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty >/dev/null
# Add Pigsty Repo definition files to /etc/yum.repos.d/ directory, including two repositoriessudo tee /etc/yum.repos.d/pigsty-io.repo > /dev/null <<-'EOF'
[pigsty-infra]
name=Pigsty Infra for $basearch
baseurl=https://repo.pigsty.io/yum/infra/$basearch
skip_if_unavailable = 1
enabled = 1
priority = 1
gpgcheck = 1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty
module_hotfixes=1
[pigsty-pgsql]
name=Pigsty PGSQL For el$releasever.$basearch
baseurl=https://repo.pigsty.io/yum/pgsql/el$releasever.$basearch
skip_if_unavailable = 1
enabled = 1
priority = 1
gpgcheck = 1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty
module_hotfixes=1
EOF# Refresh YUM/DNF repository cachesudo yum makecache;
# Add Pigsty's GPG public key to your system keychain to verify package signaturescurl -fsSL https://repo.pigsty.cc/key | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty >/dev/null
# Add Pigsty Repo definition files to /etc/yum.repos.d/ directory, including two repositoriessudo tee /etc/yum.repos.d/pigsty-cc.repo > /dev/null <<-'EOF'
[pigsty-infra]
name=Pigsty Infra for $basearch
baseurl=https://repo.pigsty.cc/yum/infra/$basearch
skip_if_unavailable = 1
enabled = 1
priority = 1
gpgcheck = 1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty
module_hotfixes=1
[pigsty-pgsql]
name=Pigsty PGSQL For el$releasever.$basearch
baseurl=https://repo.pigsty.cc/yum/pgsql/el$releasever.$basearch
skip_if_unavailable = 1
enabled = 1
priority = 1
gpgcheck = 1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty
module_hotfixes=1
EOF# Refresh YUM/DNF repository cachesudo yum makecache;
Repo Content
The pigsty-pgsql repository contains:
208 PostgreSQL extension RPM packages (maintained by Pigsty, not included in PGDG YUM repository)
215 PostgreSQL extension DEB packages (maintained by Pigsty, not included in PGDG APT repository)
How to use the Pigsty Extension APT Repo on Debian/Ubuntu Compatible OS?
You can use the following Shell commands to manually add the Pigsty repository GPG key, write the repository definition, and update the cache.
The default repo.pigsty.io repository is hosted on Cloudflare CDN, which may be slow for users in mainland China.
You can use the China CDN mirror site repo.pigsty.cc instead of the default repo.pigsty.io repository:
Add Repo
For Debian/Ubuntu and compatible systems, use the following commands to add the Pigsty repository GPG key, write the repository definition, and update the cache:
# Add Pigsty's GPG public key to your system keychain to verify package signaturescurl -fsSL https://repo.pigsty.io/key | sudo gpg --dearmor -o /etc/apt/keyrings/pigsty.gpg
# Get Debian distribution codename (distro_codename=jammy, focal, bullseye, bookworm), and write the corresponding upstream repository address to the APT List filedistro_codename=$(lsb_release -cs)sudo tee /etc/apt/sources.list.d/pigsty-io.list > /dev/null <<EOF
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.io/apt/infra generic main
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.io/apt/pgsql ${distro_codename} main
EOF# Refresh APT repository cachesudo apt update
# Add Pigsty's GPG public key to your system keychain to verify package signaturescurl -fsSL https://repo.pigsty.cc/key | sudo gpg --dearmor -o /etc/apt/keyrings/pigsty.gpg
# Get Debian distribution codename (distro_codename=jammy, focal, bullseye, bookworm), and write the corresponding upstream repository address to the APT List filedistro_codename=$(lsb_release -cs)sudo tee /etc/apt/sources.list.d/pigsty-io.list > /dev/null <<EOF
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.cc/apt/infra generic main
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.cc/apt/pgsql/${distro_codename} ${distro_codename} main
EOF# Refresh APT repository cachesudo apt update
Repo Content
The pigsty-pgsql repository contains:
208 PostgreSQL extension RPM packages (maintained by Pigsty, not included in PGDG YUM repository)
215 PostgreSQL extension DEB packages (maintained by Pigsty, not included in PGDG APT repository)