PIG 1.8 Documentation
— Postgres Install Genius, the missing extension package manager for the PostgreSQL ecosystem
PIG is a command-line tool specifically designed for installing, managing, and building PostgreSQL and its extensions. Developed in Go, it is ready to use out of the box, simple, and lightweight (about 5 MB).
PIG is not a reinvented wheel, but rather a PiggyBack - a high-level abstraction layer that leverages existing Linux distribution package managers (apt/dnf).
It abstracts away the differences between operating systems, chip architectures, and PG major versions, allowing you to install and manage PG kernels and 576 packaged extensions with just a few simple commands.
PIG is also automation-friendly by design: consistent parameter styles, clear error messages, preview switches like --plan, and confirmation steps.
Please note: for extension installation, pig is not a mandatory component. You can still use apt/dnf package managers to directly access the Pigsty PGSQL repository.
- Introduction: Why do we need a dedicated PG package manager?
- Getting Started: Quick start guide and examples
- Installation: Download, install, and update pig
Quick Start
Use the following command to install PIG on your system:
Default Installation (Cloudflare CDN):
China Mirror:
After installation, you can get started with just a few commands. For example, to install PG 18 and the pg_duckdb extension:
Command Reference
Run pig help <command> to get detailed help for subcommands.
Extension Management:
- pig repo: Manage software repositories
- pig ext: Manage PG extensions
- pig build: Build extensions from source
- pig install: Install PostgreSQL and extension packages through the native package manager
Pigsty Management:
- pig sty: Manage Pigsty installation and Grafana dashboards
- pig inventory: Inspect, edit, validate, and exchange the Pigsty inventory
- pig context: Collect host, PostgreSQL, Patroni, pgBackRest, and extension context
- pig pg: Manage local PostgreSQL server
- pig pt: Run patronictl transparently to manage Patroni HA clusters
- pig pb: Manage pgBackRest backup & restore
- pig pitr: Point-in-time recovery workflow
About
The pig CLI tool is developed by Vonng ([email protected]) and is open-sourced under the Apache 2.0 license.
You can also check out the PIGSTY project, which provides a complete PostgreSQL RDS DBaaS experience including extension delivery.
- PGEXT: Extension data and management tools
- PIG: PostgreSQL package manager
- PIGSTY: Batteries-included PostgreSQL distribution
Quick start with pig, the PostgreSQL package manager
Why do we need yet another package manager? Especially for Postgres extensions?
How to download and install the pig package manager
pig — PostgreSQL Package Manager Release Notes
pig CLI command reference overview
Manage software repositories with pig repo
Manage PostgreSQL extensions with pig ext
Build PostgreSQL extensions from source with pig build
Manage Pigsty installation with pig sty
Inspect, edit, validate, check, and exchange the Pigsty Inventory
Manage local PostgreSQL server with pig postgres subcommand
Run patronictl transparently, with Pigsty service, config, and log helpers
Manage pgBackRest backup and restore primitives with pig pgbackrest
Perform orchestrated point-in-time recovery (PITR) with pig pitr
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)