Tutorial
32 pagesDeploy HA Citus Cluster
Citus is a PostgreSQL extension that turns PostgreSQL into a distributed database. It scales horizontally across nodes to process large data volumes and query workloads. Patroni v3.0+ provides native high-availability support for Citus. This …
Citus is a PostgreSQL extension that turns PostgreSQL into a distributed database. It scales horizontally across nodes to process large data volumes and query workloads. Patroni v3.0+ provides native high-availability support for Citus. This …
Quick Start
First build a single-node cluster, create a topic, and read and write messages. Then build a separate secure three-node cluster with users, ACLs, quotas, and production topics. Finally, change parameters, connect clients, verify monitoring, and …
First build a single-node cluster, create a topic, and read and write messages. Then build a separate secure three-node cluster with users, ACLs, quotas, and production topics. Finally, change parameters, connect clients, verify monitoring, and …
Install
Pigsty uses the operating system’s package manager (yum/apt) to install extension packages. Related Parameters Use these two parameters to specify which extensions to install: Parameter Purpose Default Behavior pg_packages Global common packages …
Pigsty uses the operating system’s package manager (yum/apt) to install extension packages. Related Parameters Use these two parameters to specify which extensions to install: Parameter Purpose Default Behavior pg_packages Global common packages …
Quick Start
To use extensions in Pigsty, complete four steps: Download, Install, Config, and Create. Download: Download extension packages to the local repository. The default local repository only guarantees the base kernel and pgsql-main package set. Install: …
To use extensions in Pigsty, complete four steps: Download, Install, Config, and Create. Download: Download extension packages to the local repository. The default local repository only guarantees the base kernel and pgsql-main package set. Install: …
Tutorials
This section provides step-by-step tutorials for common PostgreSQL tasks and scenarios. Citus Cluster: Deploy and manage Citus distributed clusters Disaster Drill: Emergency recovery when 2 of 3 nodes fail PG VIP: Configure L2 VIP for PostgreSQL …
This section provides step-by-step tutorials for common PostgreSQL tasks and scenarios. Citus Cluster: Deploy and manage Citus distributed clusters Disaster Drill: Emergency recovery when 2 of 3 nodes fail PG VIP: Configure L2 VIP for PostgreSQL …
Operations SOP Index
Getting Started Path Order Question Entry 1 What modules does Pigsty include? Modular Architecture, PGSQL Architecture, PGSQL Cluster Model 2 How do I get it running first? Quick Start, Web UI, PostgreSQL Quick Start 3 How should I read the config …
Getting Started Path Order Question Entry 1 What modules does Pigsty include? Modular Architecture, PGSQL Architecture, PGSQL Cluster Model 2 How do I get it running first? Quick Start, Web UI, PostgreSQL Quick Start 3 How should I read the config …
Security Considerations
Pigsty defaults support development, testing, and demonstrations on a trusted intranet. For production, configure credentials, network boundaries, authentication, certificates, backups, and audit controls for your threat model. Security and …
Pigsty defaults support development, testing, and demonstrations on a trusted intranet. For production, configure credentials, network boundaries, authentication, certificates, backups, and audit controls for your threat model. Security and …
OpenTofu
OpenTofu is an open-source infrastructure-as-code tool. It creates public cloud virtual machines from configuration files. Pigsty uses OpenTofu by default. It supplies Terraform-compatible .tf templates for Alibaba Cloud, global AWS, AWS China, …
OpenTofu is an open-source infrastructure-as-code tool. It creates public cloud virtual machines from configuration files. Pigsty uses OpenTofu by default. It supplies Terraform-compatible .tf templates for Alibaba Cloud, global AWS, AWS China, …
Vagrant
Vagrant creates local virtual machines from declarative configuration. Pigsty requires Linux. You can use Vagrant to create local Linux virtual machines for testing. The recommended and validated versions are: Rocky Linux 9.8 / 10.2. Debian 12.15 / …
Vagrant creates local virtual machines from declarative configuration. Pigsty requires Linux. You can use Vagrant to create local Linux virtual machines for testing. The recommended and validated versions are: Rocky Linux 9.8 / 10.2. Debian 12.15 / …
Sandbox
Pigsty supplies a standard 4-node sandbox for learning, testing, and feature demonstrations. It uses fixed IP addresses and predefined identity values to make the demonstrations repeatable. Description The default sandbox has 4 nodes and uses the …
Pigsty supplies a standard 4-node sandbox for learning, testing, and feature demonstrations. It uses fixed IP addresses and predefined identity values to make the demonstrations repeatable. Description The default sandbox has 4 nodes and uses the …
Setup Admin User and Privileges
Pigsty uses an operating system administration account with SSH and sudo access to every managed node. The account must be able to log in through SSH and run sudo commands on these nodes. Passwordless access is the standard configuration; password …
Pigsty uses an operating system administration account with SSH and sudo access to every managed node. The account must be able to log in through SSH and run sudo commands on these nodes. Passwordless access is the standard configuration; password …
Planning Architecture and Nodes
Pigsty uses a modular architecture. Select the modules for your requirements and define the deployment through declarative configuration. Common Patterns Use these common deployment patterns as a starting point. Adjust the configuration for your …
Pigsty uses a modular architecture. Select the modules for your requirements and define the deployment through declarative configuration. Common Patterns Use these common deployment patterns as a starting point. Adjust the configuration for your …
Prepare Resources for Serious Deployment
Pigsty runs on nodes, which can be physical machines or virtual machines. This document describes the planning and preparation for deployment. Node Pigsty runs on the Linux kernel with x86_64 or aarch64 architecture. A node supplies a bare Linux …
Pigsty runs on nodes, which can be physical machines or virtual machines. This document describes the planning and preparation for deployment. Node Pigsty runs on the Linux kernel with x86_64 or aarch64 architecture. A node supplies a bare Linux …
Install Pigsty for Production
This guide describes production deployment on multiple nodes. For single-node demonstrations or development, use Getting Started. Summary Prepare the nodes according to your architecture plan. Install a supported Linux operating system. Configure SSH …
This guide describes production deployment on multiple nodes. For single-node demonstrations or development, use Getting Started. Summary Prepare the nodes according to your architecture plan. Install a supported Linux operating system. Configure SSH …
Security Recommendations
The default configuration supports local demonstrations and development on a trusted intranet. If other hosts can reach the deployment, examine the credentials, network access, and sensitive files. For production, also review the Security Model, …
The default configuration supports local demonstrations and development on a trusted intranet. If other hosts can reach the deployment, examine the credentials, network access, and sensitive files. For production, also review the Security Model, …
Slim Installation
Use Slim Installation to deploy PostgreSQL without the monitoring infrastructure. It installs ETCD, PGSQL, and part of NODE. It does not install INFRA, monitoring services, or a local software repository. When to use Slim Installation You only need …
Use Slim Installation to deploy PostgreSQL without the monitoring infrastructure. It installs ETCD, PGSQL, and part of NODE. It does not install INFRA, monitoring services, or a local software repository. When to use Slim Installation You only need …
Offline Installation
Pigsty normally installs packages from upstream Internet repositories. If the environment has no Internet access, use offline packages. Overview An offline package contains the RPM or DEB packages and dependencies from a local APT or YUM repository. …
Pigsty normally installs packages from upstream Internet repositories. If the environment has no Internet access, use offline packages. Overview An offline package contains the RPM or DEB packages and dependencies from a local APT or YUM repository. …
Run Playbooks with Ansible
Pigsty uses Ansible to deploy and manage clusters. Ansible applies declarative configuration through playbooks. Pigsty module playbooks use idempotent tasks to reach the specified configuration. For a single-node installation, use deploy.yml. Other …
Pigsty uses Ansible to deploy and manage clusters. Ansible applies declarative configuration through playbooks. Pigsty module playbooks use idempotent tasks to reach the specified configuration. For a single-node installation, use deploy.yml. Other …
Customize Pigsty with Configuration
You can generate a configuration file with the configuration wizard. You can also write the file yourself. This guide builds an inventory in stages. The deploy.yml playbook deploys NODE, INFRA, ETCD, MINIO, and PGSQL when the inventory defines them. …
You can generate a configuration file with the configuration wizard. You can also write the file yourself. This guide builds an inventory in stages. The deploy.yml playbook deploys NODE, INFRA, ETCD, MINIO, and PGSQL when the inventory defines them. …
Getting Started with PostgreSQL
PostgreSQL is an open-source relational database. It can store and retrieve different types of data. This guide uses PG as an abbreviation for PostgreSQL. Use this guide if you know basic Linux commands and want to start with PostgreSQL in Pigsty. …
PostgreSQL is an open-source relational database. It can store and retrieve different types of data. This guide uses PG as an abbreviation for PostgreSQL. Use this guide if you know basic Linux commands and want to start with PostgreSQL in Pigsty. …
Web Interface
The default single-node installation includes the INFRA module. This module installs an Nginx web server on the node. Nginx supplies the Web UI and proxies requests to the monitoring services and other component interfaces. Access Enter the …
The default single-node installation includes the INFRA module. This module installs an Nginx web server on the node. Nginx supplies the Web UI and proxies requests to the monitoring services and other component interfaces. Access Enter the …
Docker Deployment
Pigsty runs on native Linux. It can also run in Linux containers with systemd. If you use macOS or Windows, use Docker to try a local single-node installation. Quick Start Enter the docker/ source directory. Run the launch command: cd ~/pigsty/docker …
Pigsty runs on native Linux. It can also run in Linux containers with systemd. If you use macOS or Windows, use Docker to try a local single-node installation. Quick Start Enter the docker/ source directory. Run the launch command: cd ~/pigsty/docker …
Single-Node Installation
This guide installs Pigsty on one Linux node. Single Node For production deployments with multiple nodes, use the Deployment Guide. The procedure has three stages: Install, Configure, and Deploy. Summary Prepare a node with a supported operating …
This guide installs Pigsty on one Linux node. Single Node For production deployments with multiple nodes, use the Deployment Guide. The procedure has three stages: Install, Configure, and Deploy. Summary Prepare a node with a supported operating …
Inventory
Each Pigsty deployment has an inventory that describes the infrastructure and database clusters. Configuration File By default, Pigsty uses Ansible YAML configuration format. The inventory is a single file, pigsty.yml. ~/pigsty ^---- pigsty.yml # …
Each Pigsty deployment has an inventory that describes the infrastructure and database clusters. Configuration File By default, Pigsty uses Ansible YAML configuration format. The inventory is a single file, pigsty.yml. ~/pigsty ^---- pigsty.yml # …
Deployment
Production deployments require Architecture Planning and Preparation beyond the Getting Started procedure. This chapter describes the complete deployment process and recommended practices for production. Before production deployment, test the …
Production deployments require Architecture Planning and Preparation beyond the Getting Started procedure. This chapter describes the complete deployment process and recommended practices for production. Before production deployment, test the …
Get Started
Use this guide to install Pigsty on one Linux node. Start with Quick Start. A node with 1 CPU core and 2 GB of memory is sufficient. You can use a Linux MiniPC, a cloud server, Windows WSL, or a virtual machine on your laptop. Pigsty supplies Vagrant …
Use this guide to install Pigsty on one Linux node. Start with Quick Start. A node with 1 CPU core and 2 GB of memory is sufficient. You can use a Linux MiniPC, a cloud server, Windows WSL, or a virtual machine on your laptop. Pigsty supplies Vagrant …
PgBouncer compilation and installation
Source: https://www.pgbouncer.org/install.html · 1.26.0 source Building Build PgBouncer with Autoconf or the newer, experimental Meson build system. Autoconf is currently recommended for production builds and packages. Meson is expected to become …
Source: https://www.pgbouncer.org/install.html · 1.26.0 source Building Build PgBouncer with Autoconf or the newer, experimental Meson build system. Autoconf is currently recommended for production builds and packages. Meson is expected to become …
User Guide (RHEL)
Source: pgBackRest 2.59.2 user guide. Introduction Follow this guide in order the first time. Each section depends on earlier sections. For example, Restore requires the configuration from Quick Start. After pgBackRest is running, you can use …
Source: pgBackRest 2.59.2 user guide. Introduction Follow this guide in order the first time. Each section depends on earlier sections. For example, Restore requires the configuration from Quick Start. After pgBackRest is running, you can use …
User Guide (Debian/Ubuntu)
Source: pgBackRest 2.59.2 user guide. Introduction Follow this guide in order the first time. Each section depends on earlier sections. For example, Restore requires the configuration from Quick Start. After pgBackRest is running, you can use …
Source: pgBackRest 2.59.2 user guide. Introduction Follow this guide in order the first time. Each section depends on earlier sections. For example, Restore requires the configuration from Quick Start. After pgBackRest is running, you can use …
Installation
Source: https://patroni.readthedocs.io/en/latest/installation.html Pre-requirements for Mac OS On a Mac, install the requirements: brew install postgresql etcd haproxy libyaml python Psycopg Since psycopg2-2.8, the binary package is not installed by …
Source: https://patroni.readthedocs.io/en/latest/installation.html Pre-requirements for Mac OS On a Mac, install the requirements: brew install postgresql etcd haproxy libyaml python Psycopg Since psycopg2-2.8, the binary package is not installed by …
Getting Started
This tutorial installs PostgreSQL 18 and pgvector, starts a local test instance, and enables the extension in a database. Use a supported Linux test host with internet access and curl installed. You need root or sudo access. Run the commands in …
This tutorial installs PostgreSQL 18 and pgvector, starts a local test instance, and enables the extension in a database. Use a supported Linux test host with internet access and curl installed. You need root or sudo access. Run the commands in …