Docs Blog Download & Install 简体中文 GitHub

THE POSTGRESQL EXTENSION PACKAGE MANAGER

Postgres Install Genius

Any extension. One command. 562 packaged extensions, across PostgreSQL 14-18.

pig does not replace apt or dnf — it drives them. Native RPM / DEB packages, built by Pigsty.

$ pig install pg_duckdb -v 18
PIG // ONE LAYER ABOVE APT AND DNF pig install
APTdebDEBIAN · UBUNTU
NAME · VERSION · ARCH PIG RESOLVE · INSTALL
YUMrpmEL 8 · 9 · 10

CATALOG // 562 PACKAGED EXTENSIONS

postgisPG14-18vectorPG14-18timescaledbPG14-18pg_duckdbPG14-18
5 MB STATIC BINARYMAINTAINED BY PIGSTY

QUICK START

Three Commands to a Working Extension

From a bare host to pg_duckdb running on PostgreSQL 18.

curl -fsSL https://repo.pigsty.io/pig | bash
pig repo set
pig install -y pg18 pg_duckdb vector

Supported: EL 8 / 9 / 10 · Debian 12 / 13 · Ubuntu 22 / 24 / 26 · x86_64 and aarch64 · PostgreSQL 14 - 18

WHY IT EXISTS

Installing an Extension Shouldn't Be a Project

A large share of what Postgres can do lives in extensions — and distribution has always been the roughest part of that ecosystem.

WITHOUT PIG

Everything is on you

  • Work out where the extension even lives: PGDG, a vendor repo, or just a GitHub tarball
  • Match the PG major, the distro release, and the CPU architecture by hand
  • No package for your combination? Install a toolchain, learn pgrx, compile — then own the upgrades
  • Do it again on the next host, and again after the next PG major upgrade

WITH PIG

It is one command

  • pig repo set writes one coherent apt / dnf setup: OS + PGDG + Pigsty, mirror-aware
  • pig install pg_duckdb -v 18 resolves the name, the PG major, the distro, and the arch
  • Off the support matrix? pig build reproduces the very package Pigsty ships
  • What lands is a native RPM / DEB: remove pig and your database is untouched

pig is never mandatory: the Pigsty repositories work with plain apt and dnf, and pig never becomes a runtime dependency of your database.

CAPABILITIES

The Catalog, the Repos, the Builds — and Day Two

Four capabilities, from getting an extension installed to keeping the database running.

01 · THE CATALOG

562 Extensions, Already Packaged

No package-name guessing. No version matching

  • pig ext list duck searches the catalog by name, category, and PG version; pig ext info shows the detail
  • Extension name or package name, both work: pig install vector equals pgvector
  • pig ext scan -v 18 reports what is actually installed on this host, and what is missing
  • The catalog ships inside the binary, and pig ext reload refreshes it on its own

Extensions stop being a build problem and become an install

02 · REPOSITORIES

Repositories, Configured Not Improvised

One command writes a coherent APT / YUM setup

  • pig repo set lays down the OS, PGDG, and Pigsty repositories in one shot
  • Region detection picks a reachable mirror; mainland China falls back to repo.pigsty.cc
  • Add or drop by module: pig repo add pgsql node infra, with pig repo status to inspect
  • It follows PGDG packaging conventions and coexists with whatever you already have

Repository state stays inspectable and reversible, not a pile of hand-edited .repo files

03 · BUILD FROM SOURCE

No Package? Build the Same One

The build environment is a command, not a wiki page

  • pig build tool and rust lay down the toolchain and pgrx without dependency archaeology
  • pig build spec fetches the very specs Pigsty uses to produce its own packages
  • The output is a conventional RPM / DEB that drops straight into your own internal repository

A defined path exists even outside the support matrix

04 · DAY TWO

All the Way to Point-in-Time Recovery

Past the package manager, a well-behaved local toolbox

  • pig pg wraps local pg_ctl / psql primitives; pig pt forwards to patronictl unchanged
  • pig pb manages pgBackRest backups; pig pitr orchestrates recovery conservatively — Patroni stays down until you say otherwise
  • pig inventory edits pigsty.yml losslessly — comments, key order, and anchors survive byte for byte, and invalid YAML never reaches disk
  • pig sty turns a host into a full Pigsty PostgreSQL RDS

High-risk operations show a plan and ask first; nothing decides on your behalf