Skip to content

PIG 1.10.0 Documentation

Install, manage, and build PostgreSQL and its extensions with the pig CLI.

Current stable version: v1.10.0. Read the release notes.

PIG provides commands to find, install, and build PostgreSQL extension packages. It also manages PostgreSQL, Patroni, pgBackRest, and Pigsty workflows. Package installation uses the system’s apt, dnf, or yum.

Start here

Your taskPage
Install PostgreSQL and enable your first extensionGetting started
Learn what PIG does and which platforms it supportsIntroduction
Download, install, update, or remove PIGInstallation
Look up commands, options, and automation featuresCommand reference

Install PostgreSQL and extensions

On a Linux host with root or sudo access, run:

curl -fsSL https://repo.pigsty.io/pig | bash
sudo pig repo add pgsql --update
sudo pig install -v 18 pg18 vector

In mainland China, use https://repo.pigsty.cc/pig for the installer. These commands install PostgreSQL 18 and pgvector packages. Continue with Getting started to start a test instance and enable the extension with CREATE EXTENSION vector.

Command reference

TaskCommand
Configure APT/DNF repositoriespig repo
Query the catalog, install, or update extension packagespig ext, pig install
Build extension packages from sourcepig build
Manage local PostgreSQL instances and databasespig pg
Manage Patroni clusters through patronictlpig pt
Inspect or reload pg_exporterpig pe
Back up and restore with pgBackRestpig pb
Run point-in-time recoverypig pitr
Install and configure Pigsty, manage Grafanapig sty
Read, edit, and validate Pigsty inventorypig inventory
Run Pigsty administration playbookspig do
Collect host, database, and backup statuspig context

Run pig help <command> for command help. For automation, use pig -o json --help to inspect command capabilities, then select the relevant output and plan options.

Find more information

Press Ctrl with K (⌘ with K on macOS) to search the site. Press / for page actions. An AI assistant action sends the public page URL and a reading prompt to the selected service.

PIG is developed by Vonng and released under Apache 2.0. Pigsty provides PostgreSQL deployment, monitoring, backups, and high availability.

Install PostgreSQL and pgvector, start an instance, and enable the extension

What PIG does, how package installation works, and which platforms it supports

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

Run Pigsty administration tasks with pig do

Manage local PostgreSQL server with pig postgres subcommand

Run patronictl transparently, with Pigsty service, config, and log helpers

Read PostgreSQL metrics and reload pg_exporter configuration

Restore PostgreSQL to a selected recovery target with pgBackRest

Was this page helpful?