<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tutorial on PIGSTY</title><link>https://pigsty.io/categories/tutorial/</link><description>Recent content in Tutorial on PIGSTY</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 03 May 2026 17:21:02 +0800</lastBuildDate><atom:link href="https://pigsty.io/categories/tutorial/index.xml" rel="self" type="application/rss+xml"/><item><title>Getting Started</title><link>https://pigsty.io/docs/pig/start/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/pig/start/</guid><description>&lt;p&gt;Here is a simple getting started tutorial to help you experience the core capabilities of the PIG package manager.&lt;/p&gt;
&lt;h2 id="short-version"&gt;Short Version&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;curl -fsSL https://repo.pigsty.io/pig &lt;span class="p"&gt;|&lt;/span&gt; bash &lt;span class="c1"&gt;# Install PIG from Cloudflare&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pig repo &lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="c1"&gt;# One-time setup for Linux, Pigsty + PGDG repos (overwrites!)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pig install -v &lt;span class="m"&gt;18&lt;/span&gt; -y pg18 pg_duckdb vector &lt;span class="c1"&gt;# Install PG 18 kernel, pg_duckdb, pgvector extensions...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;You can &lt;a href="https://pigsty.io/docs/pig/install/"&gt;&lt;strong&gt;install&lt;/strong&gt;&lt;/a&gt; &lt;code&gt;pig&lt;/code&gt; with the following command:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;China Mainland&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;curl -fsSL https://repo.pigsty.cc/pig &lt;span class="p"&gt;|&lt;/span&gt; bash
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Global&lt;/strong&gt; (Cloudflare CDN):&lt;/p&gt;</description></item><item><title>Installation</title><link>https://pigsty.io/docs/patroni/installation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/patroni/installation/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Source: &lt;a href="https://patroni.readthedocs.io/en/latest/installation.html"&gt;https://patroni.readthedocs.io/en/latest/installation.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a id="installation"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="pre-requirements-for-mac-os"&gt;Pre-requirements for Mac OS&lt;/h2&gt;
&lt;p&gt;To install requirements on a Mac, run the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;brew install postgresql etcd haproxy libyaml python
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a id="psycopg2_install_options"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="psycopg"&gt;Psycopg&lt;/h2&gt;
&lt;p&gt;Starting from &lt;a href="http://initd.org/psycopg/articles/2019/04/04/psycopg-28-released/"&gt;psycopg2-2.8&lt;/a&gt; the binary version of psycopg2 will no longer be installed by default. Installing it from the source code requires C compiler and postgres+python dev packages. Since in the python world it is not possible to specify dependency as &lt;code&gt;psycopg2 OR psycopg2-binary&lt;/code&gt; you will have to decide how to install it.&lt;/p&gt;</description></item><item><title>User Guide (Debian/Ubuntu)</title><link>https://pigsty.io/docs/pgbackrest/user-guide/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/pgbackrest/user-guide/</guid><description>&lt;hr&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;This user guide is intended to be followed sequentially from beginning to end — each section depends on the last. For example, the &lt;a href="#restore-1"&gt;Restore&lt;/a&gt; section relies on setup that is performed in the &lt;a href="#quick-start"&gt;Quick Start&lt;/a&gt; section. Once pgBackRest is up and running then skipping around is possible but following the user guide in order is recommended the first time through.&lt;/p&gt;
&lt;p&gt;Although the examples in this guide are targeted at Debian/Ubuntu and PostgreSQL 16, it should be fairly easy to apply the examples to any Unix distribution and PostgreSQL version. The only OS-specific commands are those to create, start, stop, and drop PostgreSQL clusters. The pgBackRest commands will be the same on any Unix system though the location of the executable may vary. While pgBackRest strives to operate consistently across versions of PostgreSQL, there are subtle differences between versions of PostgreSQL that may show up in this guide when illustrating certain examples, e.g. PostgreSQL path/file names and settings.&lt;/p&gt;</description></item><item><title>User Guide (RHEL)</title><link>https://pigsty.io/docs/pgbackrest/user-guide-rhel/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/pgbackrest/user-guide-rhel/</guid><description>&lt;hr&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;This user guide is intended to be followed sequentially from beginning to end — each section depends on the last. For example, the &lt;a href="#restore-1"&gt;Restore&lt;/a&gt; section relies on setup that is performed in the &lt;a href="#quick-start"&gt;Quick Start&lt;/a&gt; section. Once pgBackRest is up and running then skipping around is possible but following the user guide in order is recommended the first time through.&lt;/p&gt;
&lt;p&gt;Although the examples in this guide are targeted at RHEL and PostgreSQL 13, it should be fairly easy to apply the examples to any Unix distribution and PostgreSQL version. The only OS-specific commands are those to create, start, stop, and drop PostgreSQL clusters. The pgBackRest commands will be the same on any Unix system though the location of the executable may vary. While pgBackRest strives to operate consistently across versions of PostgreSQL, there are subtle differences between versions of PostgreSQL that may show up in this guide when illustrating certain examples, e.g. PostgreSQL path/file names and settings.&lt;/p&gt;</description></item><item><title>PgBouncer compilation and installation</title><link>https://pigsty.io/docs/pgbouncer/install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/pgbouncer/install/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Source: &lt;a href="https://www.pgbouncer.org/install.html"&gt;https://www.pgbouncer.org/install.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id="building"&gt;Building&lt;/h2&gt;
&lt;p&gt;PgBouncer depends on few things to get compiled:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.gnu.org/software/make/"&gt;GNU Make&lt;/a&gt; 3.81+&lt;/li&gt;
&lt;li&gt;&lt;a href="http://libevent.org/"&gt;Libevent&lt;/a&gt; 2.0+&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freedesktop.org/wiki/Software/pkg-config/"&gt;pkg-config&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.openssl.org/"&gt;OpenSSL&lt;/a&gt; 1.0.1+ for TLS support&lt;/li&gt;
&lt;li&gt;(optional) &lt;a href="http://c-ares.haxx.se/"&gt;c-ares&lt;/a&gt; as alternative to Libevent&amp;rsquo;s evdns&lt;/li&gt;
&lt;li&gt;(optional) LDAP libraries&lt;/li&gt;
&lt;li&gt;(optional) PAM libraries&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When dependencies are installed just run:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ ./configure --prefix=/usr/local
$ make
$ make install
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you are building from Git, or are building for Windows, please see
separate build instructions below.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="dns-lookup-support"&gt;DNS lookup support&lt;/h2&gt;
&lt;p&gt;PgBouncer does host name lookups at connect time instead of just once
at configuration load time. This requires an asynchronous DNS
implementation. The following table shows supported backends and
their probing order:&lt;/p&gt;</description></item><item><title>About</title><link>https://pigsty.io/docs/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/about/</guid><description/></item><item><title>Inventory</title><link>https://pigsty.io/docs/concept/iac/inventory/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/concept/iac/inventory/</guid><description>&lt;p&gt;Every Pigsty deployment corresponds to an &lt;strong&gt;Inventory&lt;/strong&gt; that describes key properties of the infrastructure and database clusters.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="configuration-file"&gt;Configuration File&lt;/h2&gt;
&lt;p&gt;Pigsty uses &lt;a href="https://docs.ansible.com/projects/ansible/latest/inventory_guide/intro_inventory.html"&gt;&lt;strong&gt;Ansible YAML configuration format&lt;/strong&gt;&lt;/a&gt; by default,
with a single YAML configuration file &lt;a href="https://github.com/pgsty/pigsty/blob/main/pigsty.yml"&gt;&lt;strong&gt;&lt;code&gt;pigsty.yml&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; as the inventory.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;~/pigsty
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ^---- pigsty.yml &lt;span class="c1"&gt;# &amp;lt;---- Default configuration file&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can directly edit this configuration file to customize your deployment, or use the &lt;a href="https://pigsty.io/docs/concept/iac/configure"&gt;&lt;strong&gt;&lt;code&gt;configure&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; wizard script provided by Pigsty to automatically generate an appropriate configuration file.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="configuration-structure"&gt;Configuration Structure&lt;/h2&gt;
&lt;p&gt;The inventory uses standard &lt;a href="https://docs.ansible.com/projects/ansible/latest/inventory_guide/intro_inventory.html"&gt;&lt;strong&gt;Ansible YAML configuration format&lt;/strong&gt;&lt;/a&gt;, consisting of two parts: &lt;strong&gt;global parameters&lt;/strong&gt; (&lt;code&gt;all.vars&lt;/code&gt;) and multiple &lt;strong&gt;groups&lt;/strong&gt; (&lt;code&gt;all.children&lt;/code&gt;).&lt;/p&gt;</description></item><item><title>Get Started</title><link>https://pigsty.io/docs/setup/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/setup/</guid><description>&lt;p&gt;Pigsty uses a scalable architecture design, suitable for both &lt;a href="https://pigsty.io/docs/deploy"&gt;&lt;strong&gt;large-scale production environments&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://pigsty.io/docs/setup/install"&gt;&lt;strong&gt;single-node development/demo environments&lt;/strong&gt;&lt;/a&gt;. This guide focuses on the latter.&lt;/p&gt;
&lt;p&gt;If you intend to learn about Pigsty, you can start with the &lt;a href="https://pigsty.io/docs/setup/install/"&gt;&lt;strong&gt;Quick Start&lt;/strong&gt;&lt;/a&gt; single-node deployment. A Linux virtual machine with 1C/2G is sufficient to run Pigsty.&lt;/p&gt;
&lt;p&gt;You can use a Linux MiniPC, free/discounted virtual machines provided by cloud providers, Windows WSL, or create a virtual machine on your own laptop for Pigsty deployment.
Pigsty provides out-of-the-box &lt;a href="https://pigsty.io/docs/deploy/vagrant/"&gt;&lt;strong&gt;Vagrant&lt;/strong&gt;&lt;/a&gt; templates and &lt;a href="https://pigsty.io/docs/deploy/terraform/"&gt;&lt;strong&gt;Terraform&lt;/strong&gt;&lt;/a&gt; templates to help you provision Linux VMs with one click locally or in the cloud.&lt;/p&gt;</description></item><item><title>Single-Node Installation</title><link>https://pigsty.io/docs/setup/install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/setup/install/</guid><description>&lt;p&gt;This is the Pigsty single-node install guide. For multi-node HA prod deployment, refer to the &lt;a href="https://pigsty.io/docs/deploy/"&gt;&lt;strong&gt;Deployment&lt;/strong&gt;&lt;/a&gt; docs.&lt;/p&gt;
&lt;p&gt;Pigsty single-node installation consists of three steps: &lt;a href="#install"&gt;&lt;strong&gt;Install&lt;/strong&gt;&lt;/a&gt;, &lt;a href="#configure"&gt;&lt;strong&gt;Configure&lt;/strong&gt;&lt;/a&gt;, and &lt;a href="#deploy"&gt;&lt;strong&gt;Deploy&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="summary"&gt;Summary&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://pigsty.io/docs/deploy/prepare"&gt;&lt;strong&gt;Prepare&lt;/strong&gt;&lt;/a&gt; a &lt;a href="https://pigsty.io/docs/deploy/prepare#node"&gt;&lt;strong&gt;node&lt;/strong&gt;&lt;/a&gt; with &lt;a href="https://pigsty.io/docs/ref/linux/"&gt;&lt;strong&gt;compatible OS&lt;/strong&gt;&lt;/a&gt;, and run as an &lt;a href="https://pigsty.io/docs/deploy/admin"&gt;&lt;strong&gt;admin user&lt;/strong&gt;&lt;/a&gt; with nopass &lt;a href="https://pigsty.io/docs/deploy/admin#ssh"&gt;&lt;strong&gt;&lt;code&gt;ssh&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://pigsty.io/docs/deploy/admin#sudo"&gt;&lt;strong&gt;&lt;code&gt;sudo&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;



&lt;ul class="nav nav-tabs" id="tabs-0" role="tablist"&gt;
 &lt;li class="nav-item"&gt;
 &lt;button class="nav-link active"
 id="tabs-00-00-tab" data-bs-toggle="tab" data-bs-target="#tabs-00-00" role="tab"
 data-td-tp-persist="pigsty.io (global)" aria-controls="tabs-00-00" aria-selected="true"&gt;
 pigsty.io (Global)
 &lt;/button&gt;
 &lt;/li&gt;&lt;li class="nav-item"&gt;
 &lt;button class="nav-link"
 id="tabs-00-01-tab" data-bs-toggle="tab" data-bs-target="#tabs-00-01" role="tab"
 data-td-tp-persist="pigsty.cc (mirror)" aria-controls="tabs-00-01" aria-selected="false"&gt;
 pigsty.cc (Mirror)
 &lt;/button&gt;
 &lt;/li&gt;
&lt;/ul&gt;

&lt;div class="tab-content" id="tabs-0-content"&gt;
 &lt;div class="tab-body tab-pane fade show active"
 id="tabs-00-00" role="tabpanel" aria-labelled-by="tabs-00-00-tab" tabindex="0"&gt;
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;curl -fsSL https://repo.pigsty.io/get &lt;span class="p"&gt;|&lt;/span&gt; bash&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 &lt;/div&gt;
 &lt;div class="tab-body tab-pane fade"
 id="tabs-00-01" role="tabpanel" aria-labelled-by="tabs-00-01-tab" tabindex="0"&gt;
 &lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;curl -fsSL https://repo.pigsty.cc/get &lt;span class="p"&gt;|&lt;/span&gt; bash&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;This command runs the &lt;a href="#install"&gt;&lt;strong&gt;install&lt;/strong&gt;&lt;/a&gt; script, downloads and extracts Pigsty source to your home directory and installs dependencies. Then complete &lt;a href="#configure"&gt;&lt;strong&gt;Configure&lt;/strong&gt;&lt;/a&gt; and &lt;a href="#deploy"&gt;&lt;strong&gt;Deploy&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;</description></item><item><title>Docker Deployment</title><link>https://pigsty.io/docs/setup/docker/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/setup/docker/</guid><description>&lt;p&gt;Pigsty is designed for native Linux, but can also run in Linux containers with systemd.
If you don&amp;rsquo;t have native Linux (e.g., &lt;strong&gt;macOS&lt;/strong&gt; or &lt;strong&gt;Windows&lt;/strong&gt;), use Docker to spin up a local single-node Pigsty for testing.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="quick-start"&gt;Quick Start&lt;/h2&gt;
&lt;p&gt;Enter the &lt;a href="https://github.com/pgsty/pigsty/tree/main/docker"&gt;&lt;strong&gt;&lt;code&gt;docker/&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; dir in Pigsty source and launch with one command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/pigsty/docker
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;make launch &lt;span class="c1"&gt;# Start container + generate config + deploy&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After deployment, access services:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th style="text-align: left"&gt;Service&lt;/th&gt;
 &lt;th style="text-align: left"&gt;URL / Command&lt;/th&gt;
 &lt;th style="text-align: left"&gt;Credentials&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;SSH&lt;/td&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;ssh root@localhost -p 2222&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;Password: &lt;code&gt;pigsty&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;Web Portal&lt;/td&gt;
 &lt;td style="text-align: left"&gt;http://localhost:8080&lt;/td&gt;
 &lt;td style="text-align: left"&gt;-&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;Grafana&lt;/td&gt;
 &lt;td style="text-align: left"&gt;http://localhost:8080/ui&lt;/td&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;admin&lt;/code&gt; / &lt;code&gt;grafana_admin_password&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;PostgreSQL&lt;/td&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;psql 'postgres://dbuser_dba:&amp;lt;pg_admin_password&amp;gt;@localhost:5432/postgres'&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;pg_admin_password&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;code&gt;make launch&lt;/code&gt; runs &lt;code&gt;./configure -g&lt;/code&gt; internally to generate random passwords. You can check them with:&lt;/p&gt;</description></item><item><title>Web Interface</title><link>https://pigsty.io/docs/setup/webui/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/setup/webui/</guid><description>&lt;p&gt;After &lt;a href="https://pigsty.io/docs/setup/install"&gt;&lt;strong&gt;single-node installation&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;ll have the &lt;a href="https://pigsty.io/docs/infra/"&gt;&lt;strong&gt;&lt;code&gt;INFRA&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; module installed on the current node, which includes an out-of-the-box Nginx web server.&lt;/p&gt;
&lt;p&gt;The default server configuration provides a WebUI graphical interface for displaying monitoring dashboards and unified proxy access to other component web interfaces.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="access"&gt;Access&lt;/h2&gt;
&lt;p&gt;You can access this graphical interface by entering the deployment node&amp;rsquo;s IP address in your browser. By default, Nginx serves on standard ports &lt;code&gt;80/443&lt;/code&gt;.&lt;/p&gt;
&lt;table class="full-width"&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th style="text-align: center"&gt;Direct IP Access&lt;/th&gt;
 &lt;th style="text-align: center"&gt;Domain (HTTP)&lt;/th&gt;
 &lt;th style="text-align: center"&gt;Domain (HTTPS)&lt;/th&gt;
 &lt;th style="text-align: center"&gt;Demo&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;&lt;a href="http://10.10.10.10"&gt;&lt;strong&gt;&lt;code&gt;http://10.10.10.10&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;a href="http://i.pigsty"&gt;&lt;strong&gt;&lt;code&gt;http://i.pigsty&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;a href="https://i.pigsty"&gt;&lt;strong&gt;&lt;code&gt;https://i.pigsty&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;a href="https://demo.pigsty.io/zh"&gt;&lt;strong&gt;&lt;code&gt;https://demo.pigsty.io&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;a href="https://demo.pigsty.io/zh"&gt;&lt;img src="https://pigsty.io/img/pigsty/home.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Getting Started with PostgreSQL</title><link>https://pigsty.io/docs/setup/pgsql/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/setup/pgsql/</guid><description>&lt;p&gt;&lt;a href="https://www.postgresql.org/"&gt;&lt;strong&gt;PostgreSQL&lt;/strong&gt;&lt;/a&gt; (abbreviated as PG) is the world&amp;rsquo;s most advanced and popular open-source relational database. Use it to store and retrieve multi-modal data.&lt;/p&gt;
&lt;p&gt;This guide is for developers with basic Linux CLI experience but not very familiar with PostgreSQL, helping you quickly get started with PG in Pigsty.&lt;/p&gt;
&lt;p&gt;We assume you&amp;rsquo;re a personal user deploying in the default single-node mode. For prod multi-node HA cluster access, refer to &lt;a href="https://pigsty.io/docs/pgsql/service/"&gt;&lt;strong&gt;Prod Service Access&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="basics"&gt;Basics&lt;/h2&gt;
&lt;p&gt;In the default &lt;a href="https://pigsty.io/docs/setup/install"&gt;&lt;strong&gt;single-node installation&lt;/strong&gt;&lt;/a&gt; template, you&amp;rsquo;ll create a PostgreSQL database cluster named &lt;code&gt;pg-meta&lt;/code&gt; on the current node, with only one primary instance.&lt;/p&gt;</description></item><item><title>Customize Pigsty with Configuration</title><link>https://pigsty.io/docs/setup/config/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/setup/config/</guid><description>&lt;p&gt;Besides using the &lt;a href="https://pigsty.io/docs/concept/iac/configure"&gt;&lt;strong&gt;configuration wizard&lt;/strong&gt;&lt;/a&gt; to auto-generate configs, you can write Pigsty config files from scratch.
This tutorial guides you through building a complex &lt;a href="https://pigsty.io/docs/concept/iac/inventory"&gt;&lt;strong&gt;inventory&lt;/strong&gt;&lt;/a&gt; step by step.&lt;/p&gt;
&lt;p&gt;If you define everything in the &lt;a href="https://pigsty.io/docs/concept/iac/inventory"&gt;&lt;strong&gt;inventory&lt;/strong&gt;&lt;/a&gt; upfront, a single &lt;code&gt;deploy.yml&lt;/code&gt; playbook run completes all deployment—but it hides the details.&lt;/p&gt;
&lt;p&gt;This doc breaks down all modules and playbooks, showing how to incrementally build from a simple config to a complete deployment.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="minimal-configuration"&gt;Minimal Configuration&lt;/h2&gt;
&lt;p&gt;The simplest valid config only defines the &lt;a href="https://pigsty.io/docs/infra/param#admin_ip"&gt;&lt;strong&gt;&lt;code&gt;admin_ip&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; variable—the IP address of the node where Pigsty is installed (&lt;strong&gt;admin node&lt;/strong&gt;):&lt;/p&gt;</description></item><item><title>Run Playbooks with Ansible</title><link>https://pigsty.io/docs/setup/playbook/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/setup/playbook/</guid><description>&lt;p&gt;Pigsty uses &lt;a href="https://docs.ansible.com/"&gt;&lt;strong&gt;Ansible&lt;/strong&gt;&lt;/a&gt; to manage clusters, a very popular large-scale/batch/automation ops tool in the SRE community.&lt;/p&gt;
&lt;p&gt;Ansible can use &lt;strong&gt;declarative&lt;/strong&gt; approach for server configuration management. All module deployments are implemented through a series of idempotent &lt;a href="https://pigsty.io/docs/ref/playbook"&gt;&lt;strong&gt;Ansible playbooks&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For example, in single-node deployment, you&amp;rsquo;ll use the &lt;a href="#deploy-playbook"&gt;&lt;strong&gt;&lt;code&gt;deploy.yml&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; playbook. Pigsty has more &lt;a href="https://pigsty.io/docs/ref/playbook"&gt;&lt;strong&gt;built-in playbooks&lt;/strong&gt;&lt;/a&gt;, you can choose to use as needed.&lt;/p&gt;
&lt;p&gt;Understanding Ansible basics helps with better use of Pigsty, but this is &lt;strong&gt;not required&lt;/strong&gt;, especially for single-node deployment.&lt;/p&gt;</description></item><item><title>Offline Installation</title><link>https://pigsty.io/docs/setup/offline/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/setup/offline/</guid><description>&lt;p&gt;Pigsty &lt;a href="https://pigsty.io/docs/setup/install/"&gt;&lt;strong&gt;installs&lt;/strong&gt;&lt;/a&gt; from Internet upstream by default, but some envs are isolated from the Internet.
To address this, Pigsty supports offline installation using &lt;a href="#offline-packages"&gt;&lt;strong&gt;offline packages&lt;/strong&gt;&lt;/a&gt;.
Think of them as Linux-native Docker images.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Offline packages&lt;/strong&gt; bundle all required RPM/DEB packages and dependencies; they are snapshots of the local APT/YUM repo after a normal &lt;a href="https://pigsty.io/docs/setup/install/"&gt;&lt;strong&gt;installation&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In &lt;a href="https://pigsty.io/docs/deploy"&gt;&lt;strong&gt;serious prod deployments&lt;/strong&gt;&lt;/a&gt;, we &lt;strong&gt;strongly recommend&lt;/strong&gt; using offline packages.
They ensure all future nodes have consistent software versions with the existing env,
and avoid online installation failures caused by upstream changes (quite common!),
guaranteeing you can run it independently forever.&lt;/p&gt;</description></item><item><title>Slim Installation</title><link>https://pigsty.io/docs/setup/slim/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/setup/slim/</guid><description>&lt;p&gt;If you only want HA PostgreSQL database cluster itself without monitoring, infra, etc., consider &lt;strong&gt;Slim Installation&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Slim installation has no &lt;a href="https://pigsty.io/docs/infra/"&gt;&lt;strong&gt;&lt;code&gt;INFRA&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; module, no monitoring, no &lt;a href="https://pigsty.io/docs/setup/offline/"&gt;&lt;strong&gt;local repo&lt;/strong&gt;&lt;/a&gt;—just &lt;a href="https://pigsty.io/docs/etcd/"&gt;&lt;strong&gt;&lt;code&gt;ETCD&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://pigsty.io/docs/pgsql/"&gt;&lt;strong&gt;&lt;code&gt;PGSQL&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; and partial &lt;a href="https://pigsty.io/docs/node/"&gt;&lt;strong&gt;&lt;code&gt;NODE&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; functionality.&lt;/p&gt;
&lt;div class="alert alert-success" role="alert"&gt;&lt;div class="h4 alert-heading" role="heading"&gt;Slim installation is suitable for:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Only needing PostgreSQL database itself, no observability infra required.&lt;/li&gt;
&lt;li&gt;Extremely resource-constrained envs unwilling to bear infra overhead (~0.2 vCPU / 500MB on single node).&lt;/li&gt;
&lt;li&gt;Already having external monitoring system, wanting to use your own unified monitoring framework.&lt;/li&gt;
&lt;li&gt;Not needing the Grafana visualization dashboard component.
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="alert alert-warning" role="alert"&gt;&lt;div class="h4 alert-heading" role="heading"&gt;Limitations of slim installation:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;No &lt;a href="https://pigsty.io/docs/infra"&gt;&lt;strong&gt;INFRA&lt;/strong&gt;&lt;/a&gt; module, cannot use WebUI and local software repo features.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pigsty.io/docs/setup/offline"&gt;&lt;strong&gt;Offline Install&lt;/strong&gt;&lt;/a&gt; is limited to single-node mode; multi-node slim install can only be done online.
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;To use slim installation, you need to:&lt;/p&gt;</description></item><item><title>Security Tips</title><link>https://pigsty.io/docs/setup/security/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/setup/security/</guid><description>&lt;p&gt;For Demo/Dev single-node deployments, Pigsty&amp;rsquo;s default config is secure enough as long as you &lt;a href="#passwords"&gt;&lt;strong&gt;change default passwords&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If your deployment is exposed to Internet or office network, consider adding &lt;a href="#firewall"&gt;&lt;strong&gt;firewall&lt;/strong&gt;&lt;/a&gt; rules to restrict port access and source IPs for enhanced security.&lt;/p&gt;
&lt;p&gt;Additionally, we recommend protecting Pigsty&amp;rsquo;s &lt;a href="#files"&gt;&lt;strong&gt;critical files&lt;/strong&gt;&lt;/a&gt; (config files and CA private key) from unauthorized access and backing them up regularly.&lt;/p&gt;
&lt;p&gt;For enterprise prod envs with strict security requirements, refer to the &lt;a href="https://pigsty.io/docs/deploy/security/"&gt;&lt;strong&gt;Deployment - Security Hardening&lt;/strong&gt;&lt;/a&gt; documentation for advanced configuration.&lt;/p&gt;</description></item><item><title>Deployment</title><link>https://pigsty.io/docs/deploy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/deploy/</guid><description>&lt;p&gt;Unlike &lt;a href="https://pigsty.io/docs/setup/"&gt;&lt;strong&gt;Getting Started&lt;/strong&gt;&lt;/a&gt;, production Pigsty deployments require more &lt;a href="https://pigsty.io/docs/deploy/planning"&gt;&lt;strong&gt;Architecture Planning&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://pigsty.io/docs/deploy/prepare"&gt;&lt;strong&gt;Preparation&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This chapter helps you understand the complete deployment process and provides best practices for production environments.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Before deploying to production, we recommend testing in Pigsty&amp;rsquo;s &lt;a href="https://pigsty.io/docs/deploy/sandbox"&gt;&lt;strong&gt;Sandbox&lt;/strong&gt;&lt;/a&gt; to fully understand the workflow.
Use &lt;a href="https://pigsty.io/docs/deploy/vagrant/"&gt;&lt;strong&gt;Vagrant&lt;/strong&gt;&lt;/a&gt; to create a local 4-node sandbox, or leverage &lt;a href="https://pigsty.io/docs/deploy/terraform/"&gt;&lt;strong&gt;Terraform&lt;/strong&gt;&lt;/a&gt; to provision larger simulation environments in the cloud.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://pigsty.io/docs/concept/arch"&gt;&lt;img src="https://pigsty.io/img/pigsty/sandbox.png" alt="pigsty-sandbox"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For production, you typically need at least three &lt;a href="https://pigsty.io/docs/deploy/prepare"&gt;&lt;strong&gt;nodes&lt;/strong&gt;&lt;/a&gt; for high availability. You should understand Pigsty&amp;rsquo;s core &lt;a href="https://pigsty.io/docs/concept"&gt;&lt;strong&gt;Concepts&lt;/strong&gt;&lt;/a&gt; and common administration procedures,
including &lt;a href="https://pigsty.io/docs/setup/config"&gt;&lt;strong&gt;Configuration&lt;/strong&gt;&lt;/a&gt;, &lt;a href="https://pigsty.io/docs/setup/playbook"&gt;&lt;strong&gt;Ansible Playbooks&lt;/strong&gt;&lt;/a&gt;, and &lt;a href="https://pigsty.io/docs/deploy/security"&gt;&lt;strong&gt;Security Hardening&lt;/strong&gt;&lt;/a&gt; for enterprise compliance.&lt;/p&gt;</description></item><item><title>Install Pigsty for Production</title><link>https://pigsty.io/docs/deploy/install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/deploy/install/</guid><description>&lt;p&gt;This is the Pigsty production multi-node deployment guide. For single-node Demo/Dev setups, see &lt;a href="https://pigsty.io/docs/setup/"&gt;&lt;strong&gt;Getting Started&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="summary"&gt;Summary&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://pigsty.io/docs/deploy/prepare"&gt;&lt;strong&gt;Prepare&lt;/strong&gt;&lt;/a&gt; &lt;a href="https://pigsty.io/docs/deploy/prepare#node"&gt;&lt;strong&gt;nodes&lt;/strong&gt;&lt;/a&gt; with &lt;a href="https://pigsty.io/docs/deploy/admin#ssh"&gt;&lt;strong&gt;SSH access&lt;/strong&gt;&lt;/a&gt; following your &lt;a href="https://pigsty.io/docs/deploy/planning"&gt;&lt;strong&gt;architecture plan&lt;/strong&gt;&lt;/a&gt;,
install a &lt;a href="https://pigsty.io/docs/ref/linux/"&gt;&lt;strong&gt;compatible Linux OS&lt;/strong&gt;&lt;/a&gt;, then execute with an &lt;a href="https://pigsty.io/docs/deploy/admin"&gt;&lt;strong&gt;admin user&lt;/strong&gt;&lt;/a&gt; having passwordless &lt;a href="https://pigsty.io/docs/deploy/admin#ssh"&gt;&lt;strong&gt;&lt;code&gt;ssh&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://pigsty.io/docs/deploy/admin#sudo"&gt;&lt;strong&gt;&lt;code&gt;sudo&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;curl -fsSL https://repo.pigsty.io/get &lt;span class="p"&gt;|&lt;/span&gt; bash&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;# International&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;curl -fsSL https://repo.pigsty.cc/get &lt;span class="p"&gt;|&lt;/span&gt; bash&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;# Backup Mirror&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This runs the &lt;a href="#install"&gt;&lt;strong&gt;install&lt;/strong&gt;&lt;/a&gt; script, downloading and extracting Pigsty source to your home directory with dependencies installed. Complete &lt;a href="#configure"&gt;&lt;strong&gt;configuration&lt;/strong&gt;&lt;/a&gt; and &lt;a href="#deploy"&gt;&lt;strong&gt;deployment&lt;/strong&gt;&lt;/a&gt; to finish.&lt;/p&gt;
&lt;p&gt;Before running &lt;a href="https://pigsty.io/docs/setup/playbook"&gt;&lt;strong&gt;&lt;code&gt;deploy.yml&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; for deployment, review and edit the &lt;a href="https://pigsty.io/docs/concept/iac/inventory"&gt;&lt;strong&gt;configuration inventory&lt;/strong&gt;&lt;/a&gt;: &lt;code&gt;pigsty.yml&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Prepare Resources for Serious Deployment</title><link>https://pigsty.io/docs/deploy/prepare/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/deploy/prepare/</guid><description>&lt;p&gt;Pigsty runs on nodes (physical machines or VMs). This document covers the planning and preparation required for deployment.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="node"&gt;Node&lt;/h2&gt;
&lt;p&gt;Pigsty currently runs on &lt;code&gt;Linux&lt;/code&gt; kernel with &lt;code&gt;x86_64&lt;/code&gt; / &lt;code&gt;aarch64&lt;/code&gt; architecture.
A &amp;ldquo;&lt;strong&gt;node&lt;/strong&gt;&amp;rdquo; refers to an SSH &lt;a href="https://pigsty.io/docs/deploy/admin#check-accessibility"&gt;&lt;strong&gt;accessible&lt;/strong&gt;&lt;/a&gt; resource that provides a bare Linux OS environment.
It can be a physical machine, virtual machine, or a systemd-enabled container equipped with &lt;code&gt;systemd&lt;/code&gt;, &lt;code&gt;sudo&lt;/code&gt;, and &lt;code&gt;sshd&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Deploying Pigsty requires at least &lt;strong&gt;1&lt;/strong&gt; node. You can prepare more and deploy everything in one pass via &lt;a href="https://pigsty.io/docs/setup/playbook#playbooks"&gt;&lt;strong&gt;playbooks&lt;/strong&gt;&lt;/a&gt;, or add nodes later.
The minimum spec requirement is &lt;code&gt;1C1G&lt;/code&gt;, but at least &lt;code&gt;1C2G&lt;/code&gt; is recommended. Higher is better—no upper limit. &lt;strong&gt;Parameters are auto-tuned based on available resources&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Planning Architecture and Nodes</title><link>https://pigsty.io/docs/deploy/planning/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/deploy/planning/</guid><description>&lt;p&gt;Pigsty uses a &lt;a href="https://pigsty.io/docs/concept/arch"&gt;&lt;strong&gt;modular architecture&lt;/strong&gt;&lt;/a&gt;. You can combine modules like building blocks and express your intent through &lt;a href="https://pigsty.io/docs/concept/iac"&gt;&lt;strong&gt;declarative configuration&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="common-patterns"&gt;Common Patterns&lt;/h2&gt;
&lt;p&gt;Here are common deployment patterns for reference. Customize based on your requirements:&lt;/p&gt;
&lt;table class="full-width"&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th style="text-align: center"&gt;Pattern&lt;/th&gt;
 &lt;th style="text-align: center"&gt;&lt;a href="https://pigsty.io/docs/infra/"&gt;&lt;strong&gt;INFRA&lt;/strong&gt;&lt;/a&gt;&lt;/th&gt;
 &lt;th style="text-align: center"&gt;&lt;a href="https://pigsty.io/docs/etcd/"&gt;&lt;strong&gt;ETCD&lt;/strong&gt;&lt;/a&gt;&lt;/th&gt;
 &lt;th style="text-align: center"&gt;&lt;a href="https://pigsty.io/docs/pgsql/"&gt;&lt;strong&gt;PGSQL&lt;/strong&gt;&lt;/a&gt;&lt;/th&gt;
 &lt;th style="text-align: center"&gt;&lt;a href="https://pigsty.io/docs/minio"&gt;&lt;strong&gt;MINIO&lt;/strong&gt;&lt;/a&gt;&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;Single-node (&lt;a href="https://pigsty.io/docs/conf/meta"&gt;&lt;strong&gt;&lt;code&gt;meta&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;)&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td&gt;&lt;a href="https://pigsty.io/docs/setup/install"&gt;&lt;strong&gt;Single-node deployment&lt;/strong&gt;&lt;/a&gt; default&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;Slim deploy (&lt;a href="https://pigsty.io/docs/conf/slim"&gt;&lt;strong&gt;&lt;code&gt;slim&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;)&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td&gt;Database only, no monitoring infra&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;Infra-only (&lt;a href="https://pigsty.io/docs/conf/infra"&gt;&lt;strong&gt;&lt;code&gt;infra&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;)&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td&gt;Monitoring infrastructure only&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;Rich deploy (&lt;a href="https://pigsty.io/docs/conf/rich"&gt;&lt;strong&gt;&lt;code&gt;rich&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;)&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td&gt;Single-node + object storage + local repo with all extensions&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;table class="full-width"&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th style="text-align: center"&gt;Multi-node Pattern&lt;/th&gt;
 &lt;th style="text-align: center"&gt;&lt;a href="https://pigsty.io/docs/infra/"&gt;&lt;strong&gt;INFRA&lt;/strong&gt;&lt;/a&gt;&lt;/th&gt;
 &lt;th style="text-align: center"&gt;&lt;a href="https://pigsty.io/docs/etcd/"&gt;&lt;strong&gt;ETCD&lt;/strong&gt;&lt;/a&gt;&lt;/th&gt;
 &lt;th style="text-align: center"&gt;&lt;a href="https://pigsty.io/docs/pgsql/"&gt;&lt;strong&gt;PGSQL&lt;/strong&gt;&lt;/a&gt;&lt;/th&gt;
 &lt;th style="text-align: center"&gt;&lt;a href="https://pigsty.io/docs/minio"&gt;&lt;strong&gt;MINIO&lt;/strong&gt;&lt;/a&gt;&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;Two-node (&lt;a href="https://pigsty.io/docs/conf/dual"&gt;&lt;strong&gt;&lt;code&gt;dual&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;)&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;2&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td&gt;Semi-HA, tolerates specific node failure&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;Three-node (&lt;a href="https://pigsty.io/docs/conf/trio"&gt;&lt;strong&gt;&lt;code&gt;trio&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;)&lt;/td&gt;
 &lt;td style="text-align: center"&gt;3&lt;/td&gt;
 &lt;td style="text-align: center"&gt;3&lt;/td&gt;
 &lt;td style="text-align: center"&gt;3&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td&gt;Standard HA, tolerates any one failure&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;Four-node (&lt;a href="https://pigsty.io/docs/conf/full"&gt;&lt;strong&gt;&lt;code&gt;full&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;)&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;1+3&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td&gt;Demo setup, single INFRA/ETCD&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;Production (&lt;a href="https://pigsty.io/docs/conf/simu"&gt;&lt;strong&gt;&lt;code&gt;simu&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;)&lt;/td&gt;
 &lt;td style="text-align: center"&gt;2&lt;/td&gt;
 &lt;td style="text-align: center"&gt;3&lt;/td&gt;
 &lt;td style="text-align: center"&gt;n&lt;/td&gt;
 &lt;td style="text-align: center"&gt;n&lt;/td&gt;
 &lt;td&gt;2 INFRA, 3 ETCD&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;Large-scale (custom)&lt;/td&gt;
 &lt;td style="text-align: center"&gt;3&lt;/td&gt;
 &lt;td style="text-align: center"&gt;5&lt;/td&gt;
 &lt;td style="text-align: center"&gt;n&lt;/td&gt;
 &lt;td style="text-align: center"&gt;n&lt;/td&gt;
 &lt;td&gt;3 INFRA, 5 ETCD&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Your architecture choice depends on reliability requirements and available resources.
Serious production deployments require at least &lt;strong&gt;3&lt;/strong&gt; nodes for &lt;a href="#three-node-setup"&gt;&lt;strong&gt;HA configuration&lt;/strong&gt;&lt;/a&gt;.
With only &lt;strong&gt;2&lt;/strong&gt; nodes, use &lt;a href="#two-node-setup"&gt;&lt;strong&gt;Semi-HA configuration&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Setup Admin User and Privileges</title><link>https://pigsty.io/docs/deploy/admin/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/deploy/admin/</guid><description>&lt;p&gt;Pigsty requires an OS &lt;strong&gt;admin user&lt;/strong&gt; with passwordless &lt;a href="#ssh"&gt;&lt;strong&gt;SSH&lt;/strong&gt;&lt;/a&gt; and &lt;a href="#sudo"&gt;&lt;strong&gt;Sudo&lt;/strong&gt;&lt;/a&gt; privileges on all managed nodes.&lt;/p&gt;
&lt;p&gt;This user must be able to SSH to all managed nodes and execute sudo commands on them.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="user"&gt;User&lt;/h2&gt;
&lt;p&gt;Typically use names like &lt;code&gt;dba&lt;/code&gt; or &lt;code&gt;admin&lt;/code&gt;, avoiding &lt;code&gt;root&lt;/code&gt; and &lt;code&gt;postgres&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using &lt;code&gt;root&lt;/code&gt; for deployment is possible but not a production best practice.&lt;/li&gt;
&lt;li&gt;Using &lt;code&gt;postgres&lt;/code&gt; (&lt;a href="https://pigsty.io/docs/pgsql/param#pg_dbsu"&gt;&lt;strong&gt;&lt;code&gt;pg_dbsu&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;) as admin user is strictly prohibited.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="passwordless"&gt;Passwordless&lt;/h2&gt;
&lt;p&gt;The passwordless requirement is optional if you can accept entering a password for every &lt;code&gt;ssh&lt;/code&gt; and &lt;code&gt;sudo&lt;/code&gt; command.&lt;/p&gt;</description></item><item><title>Sandbox</title><link>https://pigsty.io/docs/deploy/sandbox/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/deploy/sandbox/</guid><description>&lt;p&gt;Pigsty provides a standard 4-node &lt;strong&gt;sandbox&lt;/strong&gt; environment for learning, testing, and feature demonstration.&lt;/p&gt;
&lt;p&gt;The sandbox uses fixed IP addresses and predefined identity identifiers, making it easy to reproduce various demo use cases.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="description"&gt;Description&lt;/h2&gt;
&lt;p&gt;The default sandbox environment consists of 4 nodes, using the &lt;a href="https://github.com/pgsty/pigsty/blob/main/conf/ha/full.yml"&gt;&lt;code&gt;ha/full.yml&lt;/code&gt;&lt;/a&gt; configuration template.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th style="text-align: center"&gt;ID&lt;/th&gt;
 &lt;th style="text-align: center"&gt;IP Address&lt;/th&gt;
 &lt;th style="text-align: center"&gt;Node&lt;/th&gt;
 &lt;th style="text-align: center"&gt;PostgreSQL&lt;/th&gt;
 &lt;th style="text-align: center"&gt;INFRA&lt;/th&gt;
 &lt;th style="text-align: center"&gt;ETCD&lt;/th&gt;
 &lt;th style="text-align: center"&gt;MINIO&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;10.10.10.10&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;meta&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;pg-meta-1&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;infra-1&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;etcd-1&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;minio-1&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;2&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;10.10.10.11&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;node-1&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;pg-test-1&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;3&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;10.10.10.12&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;node-2&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;pg-test-2&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;4&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;10.10.10.13&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;node-3&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;code&gt;pg-test-3&lt;/code&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;td style="text-align: center"&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The sandbox configuration can be summarized as the following config:&lt;/p&gt;</description></item><item><title>Vagrant</title><link>https://pigsty.io/docs/deploy/vagrant/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/deploy/vagrant/</guid><description>&lt;p&gt;&lt;a href="https://www.vagrantup.com/"&gt;&lt;strong&gt;Vagrant&lt;/strong&gt;&lt;/a&gt; is a popular local virtualization tool that creates local virtual machines in a declarative manner.&lt;/p&gt;
&lt;p&gt;Pigsty requires a Linux environment to run. You can use Vagrant to easily create Linux virtual machines locally for testing.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="quick-start"&gt;Quick Start&lt;/h2&gt;
&lt;h3 id="install-dependencies"&gt;Install Dependencies&lt;/h3&gt;
&lt;p&gt;First, ensure you have &lt;a href="https://www.vagrantup.com/"&gt;&lt;strong&gt;Vagrant&lt;/strong&gt;&lt;/a&gt; and a virtual machine provider (such as &lt;a href="https://www.virtualbox.org/"&gt;&lt;strong&gt;VirtualBox&lt;/strong&gt;&lt;/a&gt; or &lt;a href="https://libvirt.org/"&gt;&lt;strong&gt;libvirt&lt;/strong&gt;&lt;/a&gt;) installed on your system.&lt;/p&gt;
&lt;p&gt;On macOS, you can use &lt;a href="https://brew.sh/"&gt;&lt;strong&gt;Homebrew&lt;/strong&gt;&lt;/a&gt; for one-click installation:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/bin/bash -c &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;brew install vagrant virtualbox ansible
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="alert alert-warning" role="alert"&gt;&lt;div class="h4 alert-heading" role="heading"&gt;VirtualBox requires reboot after installation&lt;/div&gt;
&lt;p&gt;After installing VirtualBox, you need to restart your system and allow its kernel extensions in System Preferences.&lt;/p&gt;</description></item><item><title>Terraform</title><link>https://pigsty.io/docs/deploy/terraform/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/deploy/terraform/</guid><description>&lt;p&gt;&lt;a href="https://www.terraform.io/"&gt;&lt;strong&gt;Terraform&lt;/strong&gt;&lt;/a&gt; is a popular &amp;ldquo;Infrastructure as Code&amp;rdquo; tool that you can use to create virtual machines on public clouds with one click.&lt;/p&gt;
&lt;p&gt;Pigsty provides Terraform templates for Alibaba Cloud, AWS, and Tencent Cloud as examples.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="quick-start"&gt;Quick Start&lt;/h2&gt;
&lt;h3 id="install-terraform"&gt;Install Terraform&lt;/h3&gt;
&lt;p&gt;On macOS, you can use &lt;a href="https://brew.sh/"&gt;&lt;strong&gt;Homebrew&lt;/strong&gt;&lt;/a&gt; to install Terraform:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;brew install terraform
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For other platforms, refer to the &lt;a href="https://developer.hashicorp.com/terraform/install"&gt;&lt;strong&gt;Terraform Official Installation Guide&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="initialize-and-apply"&gt;Initialize and Apply&lt;/h3&gt;
&lt;p&gt;Enter the Terraform directory, select a template, initialize provider plugins, and apply the configuration:&lt;/p&gt;</description></item><item><title>Security</title><link>https://pigsty.io/docs/deploy/security/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/deploy/security/</guid><description>&lt;p&gt;Pigsty&amp;rsquo;s default configuration is sufficient to cover the security needs of most scenarios.&lt;/p&gt;
&lt;p&gt;Pigsty already provides out-of-the-box &lt;a href="https://pigsty.io/docs/pgsql/config/hba"&gt;authentication&lt;/a&gt; and &lt;a href="https://pigsty.io/docs/concept/sec/ac/"&gt;access control&lt;/a&gt; models that are secure enough for most scenarios.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://pigsty.io/docs/concept/sec/ac/"&gt;&lt;img src="https://pigsty.io/img/pigsty/acl.jpg" alt="pigsty-acl.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you want to further harden system security, here are some recommendations:&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="confidentiality"&gt;Confidentiality&lt;/h2&gt;
&lt;h3 id="important-files"&gt;Important Files&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Protect your pigsty.yml configuration file or CMDB&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;pigsty.yml&lt;/code&gt; configuration file usually contains highly sensitive confidential information. You should ensure its security.&lt;/li&gt;
&lt;li&gt;Strictly control access permissions to admin nodes, limiting access to DBAs or Infra administrators only.&lt;/li&gt;
&lt;li&gt;Strictly control access permissions to the pigsty.yml configuration file repository (if you manage it with git)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Protect your CA private key and other certificates, these files are very important.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Tutorials</title><link>https://pigsty.io/docs/pgsql/tutorial/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/pgsql/tutorial/</guid><description>&lt;p&gt;This section provides step-by-step tutorials for common PostgreSQL tasks and scenarios.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="citus/"&gt;&lt;strong&gt;Citus Cluster&lt;/strong&gt;&lt;/a&gt;: Deploy and manage Citus distributed clusters&lt;/li&gt;
&lt;li&gt;&lt;a href="drill/"&gt;&lt;strong&gt;Disaster Drill&lt;/strong&gt;&lt;/a&gt;: Emergency recovery when 2 of 3 nodes fail&lt;/li&gt;
&lt;li&gt;&lt;a href="pg-vip/"&gt;&lt;strong&gt;PG VIP&lt;/strong&gt;&lt;/a&gt;: Configure L2 VIP for PostgreSQL clusters&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Deploy HA Citus Cluster</title><link>https://pigsty.io/docs/pgsql/tutorial/citus/</link><pubDate>Sat, 11 Jan 2025 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/pgsql/tutorial/citus/</guid><description>&lt;p&gt;Citus is a PostgreSQL extension that transforms PostgreSQL into a distributed database, enabling horizontal scaling across multiple nodes to handle large amounts of data and queries.&lt;/p&gt;
&lt;p&gt;Patroni v3.0+ provides native high-availability support for Citus, simplifying the setup of Citus clusters. Pigsty also provides native support for this.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.citusdata.com/en/stable/get_started/what_is_citus.html"&gt;What is Citus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://patroni.readthedocs.io/en/latest/citus.html"&gt;Patroni Citus Support&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: Citus 13.x supports PostgreSQL 18, 17, 16, 15, and 14. Pigsty extension repo provides Citus ARM64 packages.&lt;/p&gt;</description></item><item><title>Quick Start</title><link>https://pigsty.io/docs/pgsql/ext/start/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/pgsql/ext/start/</guid><description>&lt;p&gt;Using extensions in Pigsty requires four steps: &lt;strong&gt;Download&lt;/strong&gt;, &lt;strong&gt;Install&lt;/strong&gt;, &lt;strong&gt;Config&lt;/strong&gt;, and &lt;strong&gt;Create&lt;/strong&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Download&lt;/strong&gt;: Download extension packages to the local repository (Pigsty has already downloaded mainstream extensions by default)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Install&lt;/strong&gt;: Install extension packages on cluster nodes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Config&lt;/strong&gt;: Some extensions need to be preloaded or configured with parameters&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create&lt;/strong&gt;: Execute &lt;code&gt;CREATE EXTENSION&lt;/code&gt; in the database to create the extension&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2 id="declarative-configuration"&gt;Declarative Configuration&lt;/h2&gt;
&lt;p&gt;Declare extensions in the Pigsty configuration manifest, and they will be automatically installed and created during cluster initialization:&lt;/p&gt;</description></item><item><title>Install</title><link>https://pigsty.io/docs/pgsql/ext/install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pigsty.io/docs/pgsql/ext/install/</guid><description>&lt;p&gt;Pigsty uses the operating system&amp;rsquo;s package manager (yum/apt) to install extension packages.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="related-parameters"&gt;Related Parameters&lt;/h2&gt;
&lt;p&gt;Two parameters are used to specify extensions to install:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th style="text-align: left"&gt;Parameter&lt;/th&gt;
 &lt;th style="text-align: left"&gt;Purpose&lt;/th&gt;
 &lt;th style="text-align: left"&gt;Default Behavior&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;a href="https://pigsty.io/docs/pgsql/param#pg_packages"&gt;&lt;code&gt;pg_packages&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;Global common packages&lt;/td&gt;
 &lt;td style="text-align: left"&gt;Ensure present (no upgrade)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;&lt;a href="https://pigsty.io/docs/pgsql/param#pg_extensions"&gt;&lt;code&gt;pg_extensions&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
 &lt;td style="text-align: left"&gt;Cluster-specific extensions&lt;/td&gt;
 &lt;td style="text-align: left"&gt;Install latest version&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;code&gt;pg_packages&lt;/code&gt; is typically used to specify base components needed by all clusters (PostgreSQL kernel, Patroni, pgBouncer, etc.) and essential extensions.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pg_extensions&lt;/code&gt; is used to specify extensions needed by specific clusters.&lt;/p&gt;</description></item></channel></rss>