Getting Started
Quick start with pig, the PostgreSQL package manager
— 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’s ready to use out of the box, simple, and lightweight (4MB).
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 431+ extensions with just a few simple commands.
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.
Use the following command to install PIG on your system:
Default Installation (Cloudflare CDN):
curl -fsSL https://repo.pigsty.io/pig | bash
China Mirror:
curl -fsSL https://repo.pigsty.cc/pig | bash
After installation, you can get started with just a few commands. For example, to install PG 18 and the pg_duckdb extension:
$ pig repo set # One-time setup for Linux, Pigsty + PGDG repos (overwrites!)
$ pig install pg18 # Install PostgreSQL 18 kernel (native PGDG packages)
$ pig install pg_duckdb -v 18 # Install pg_duckdb extension (for PG 18)
$ pig install -y postgis timescaledb # Install multiple extensions for current active PG version
$ pig install -y vector # You can use extension name (vector) or package name (pgvector)!
Run pig help <command> to get detailed help for subcommands.
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.
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 PostgreSQL extensions with pig ext subcommand
Manage software repositories with pig repo subcommand
Manage Pigsty installation with pig sty subcommand
Build PostgreSQL extensions from source with pig build subcommand
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.