Concept
74 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 …
HA Drill: Handling 2-of-3 Node Failure
In a typical 3-node HA deployment, simultaneous failure of two nodes removes the majority. The system usually cannot complete automatic failover and needs manual intervention. First, assess the two failed servers. If they can restart quickly, …
In a typical 3-node HA deployment, simultaneous failure of two nodes removes the majority. The system usually cannot complete automatic failover and needs manual intervention. First, assess the two failed servers. If they can restart quickly, …
Supabase
Supabase — Build in a weekend, Scale to millions Supabase is an open-source Firebase alternative built on PostgreSQL. It provides authentication, ready-to-use APIs, edge functions, real-time subscriptions, object storage, and vector embeddings. The …
Supabase — Build in a weekend, Scale to millions Supabase is an open-source Firebase alternative built on PostgreSQL. It provides authentication, ready-to-use APIs, edge functions, real-time subscriptions, object storage, and vector embeddings. The …
pgBackRest 2.60.0 Documentation
Introduction pgBackRest is a reliable backup and restore solution for PostgreSQL that seamlessly scales up to the largest databases and workloads. This documentation mirror covers pgBackRest v2.60.0. Release notes are on the Releases page. Version …
Introduction pgBackRest is a reliable backup and restore solution for PostgreSQL that seamlessly scales up to the largest databases and workloads. This documentation mirror covers pgBackRest v2.60.0. Release notes are on the Releases page. Version …
PgBouncer 1.26.1 Documentation
This manual is based on PgBouncer 1.26.1, released on 2026-10-14. See the release notes for the changes from earlier versions. pgbouncer is a PostgreSQL connection pooler. Any target application can be connected to pgbouncer as if it were a …
This manual is based on PgBouncer 1.26.1, released on 2026-10-14. See the release notes for the changes from earlier versions. pgbouncer is a PostgreSQL connection pooler. Any target application can be connected to pgbouncer as if it were a …
Patroni 4.1.5 Documentation
Warning Running Patroni on memory-restricted systems with Python 3.11+ If you run Patroni on a system with strict memory limits, for example with vm.overcommit_memory=2 (recommended for PostgreSQL), and use Python 3.11 or newer, you may observe …
Warning Running Patroni on memory-restricted systems with Python 3.11+ If you run Patroni on a system with strict memory limits, for example with vm.overcommit_memory=2 (recommended for PostgreSQL), and use Python 3.11 or newer, you may observe …
Neon
Neon separates storage from compute. It provides automatic scaling, scale-to-zero operation, and database branching. Neon official website: https://neon.tech/ Neon binaries are currently too large for the open-source package set. This support remains …
Neon separates storage from compute. It provides automatic scaling, scale-to-zero operation, and database branching. Neon official website: https://neon.tech/ Neon binaries are currently too large for the open-source package set. This support remains …
Greenplum
Pigsty supports deployment of Greenplum clusters and the derivative distribution YMatrixDB. You can also add existing Greenplum deployments to Pigsty monitoring. Overview Only the professional/enterprise editions provide Greenplum / YMatrix cluster …
Pigsty supports deployment of Greenplum clusters and the derivative distribution YMatrixDB. You can also add existing Greenplum deployments to Pigsty monitoring. Overview Only the professional/enterprise editions provide Greenplum / YMatrix cluster …
PolarDB Oracle
Use Pigsty to create PolarDB for Oracle clusters with “domestic innovation qualification” credentials. The Security and Reliability Evaluation Results Announcement (No. 1, 2023) lists PolarDB v2.0 in Appendix 3, Centralized Database. It identifies …
Use Pigsty to create PolarDB for Oracle clusters with “domestic innovation qualification” credentials. The Security and Reliability Evaluation Results Announcement (No. 1, 2023) lists PolarDB v2.0 in Appendix 3, Centralized Database. It identifies …
PolarDB PG
Overview Use Pigsty and PolarDB to create PostgreSQL clusters with “domestic innovation qualification” credentials. PolarDB for PostgreSQL now uses PostgreSQL 17 as its base. The Pigsty polar template, default path, and extension notes now use PG17. …
Overview Use Pigsty and PolarDB to create PostgreSQL clusters with “domestic innovation qualification” credentials. PolarDB for PostgreSQL now uses PostgreSQL 17 as its base. The Pigsty polar template, default path, and extension notes now use PG17. …
IvorySQL
IvorySQL is an open-source PostgreSQL kernel fork that aims to provide Oracle compatibility. Overview The Pigsty PGSQL repository provides IvorySQL 5.6 packages compatible with PostgreSQL 18.6. Packages cover the currently supported EL, Debian, and …
IvorySQL is an open-source PostgreSQL kernel fork that aims to provide Oracle compatibility. Overview The Pigsty PGSQL repository provides IvorySQL 5.6 packages compatible with PostgreSQL 18.6. Packages cover the currently supported EL, Debian, and …
Citus
Pigsty natively supports Citus. This is a distributed horizontal scaling extension based on the native PostgreSQL kernel. Installation Citus is a PostgreSQL extension plugin. Use the standard extension installation procedure to install and enable it …
Pigsty natively supports Citus. This is a distributed horizontal scaling extension based on the native PostgreSQL kernel. Installation Citus is a PostgreSQL extension plugin. Use the standard extension installation procedure to install and enable it …
PG Kernels
In Pigsty, you can replace the native PostgreSQL kernel with a variant that provides specialized features. Pigsty supports multiple PostgreSQL kernels and compatibility branches within one operational framework. These kernels provide compatibility …
In Pigsty, you can replace the native PostgreSQL kernel with a variant that provides specialized features. Pigsty supports multiple PostgreSQL kernels and compatibility branches within one operational framework. These kernels provide compatibility …
DocumentDB
Microsoft maintains DocumentDB, an open-source PostgreSQL document database extension. FerretDB is a stateless protocol translation proxy built on DocumentDB. Together, they provide a MongoDB wire-compatible endpoint for a standard PostgreSQL kernel. …
Microsoft maintains DocumentDB, an open-source PostgreSQL document database extension. FerretDB is a stateless protocol translation proxy built on DocumentDB. Together, they provide a MongoDB wire-compatible endpoint for a standard PostgreSQL kernel. …
pgEdge
pgEdge is a distributed PostgreSQL distribution for edge deployments. It uses Spock multi-master logical replication. Overview Pigsty integrates pgEdge through pg_mode: pgedge and delivers it through the standard PostgreSQL cluster workflow: pgedge: …
pgEdge is a distributed PostgreSQL distribution for edge deployments. It uses Spock multi-master logical replication. Overview Pigsty integrates pgEdge through pg_mode: pgedge and delivers it through the standard PostgreSQL cluster workflow: pgedge: …
AgensGraph
AgensGraph is a property graph database kernel built on PostgreSQL. It supports openCypher queries and mixed Cypher/SQL workflows. Overview Pigsty integrates AgensGraph through pg_mode: agens while preserving most of the standard PostgreSQL …
AgensGraph is a property graph database kernel built on PostgreSQL. It supports openCypher queries and mixed Cypher/SQL workflows. Overview Pigsty integrates AgensGraph through pg_mode: agens while preserving most of the standard PostgreSQL …
Cloudberry
Cloudberry is an open-source MPP data warehouse kernel derived from the Greenplum ecosystem. It supports large-scale parallel analytics workloads. Overview In Pigsty, Cloudberry uses gpsql mode and shares the same identity model, monitoring logic, …
Cloudberry is an open-source MPP data warehouse kernel derived from the Greenplum ecosystem. It supports large-scale parallel analytics workloads. Overview In Pigsty, Cloudberry uses gpsql mode and shares the same identity model, monitoring logic, …
OrioleDB
OrioleDB is a PostgreSQL storage engine extension. It supports data storage in S3. Its MVCC uses UNDO logs to hold older row versions, reducing bloat in primary storage, and 64-bit transaction IDs avoid traditional XID wraparound. See the upstream …
OrioleDB is a PostgreSQL storage engine extension. It supports data storage in S3. Its MVCC uses UNDO logs to hold older row versions, reducing bloat in primary storage, and 64-bit transaction IDs avoid traditional XID wraparound. See the upstream …
openHalo
OpenHalo is an open-source PostgreSQL kernel that provides MySQL wire-protocol compatibility. openHalo is based on PostgreSQL 14.18 and provides wire-level compatibility with MySQL 5.7.32-log / 8.0. Pigsty delivers it through pg_mode: mysql and the …
OpenHalo is an open-source PostgreSQL kernel that provides MySQL wire-protocol compatibility. openHalo is based on PostgreSQL 14.18 and provides wire-level compatibility with MySQL 5.7.32-log / 8.0. Pigsty delivers it through pg_mode: mysql and the …
Percona
Percona Postgres is a patched Postgres kernel with pg_tde (Transparent Data Encryption) extension. Since v4.4.0, Pigsty packages Percona PostgreSQL under /usr/pgtde-$v (/usr/pgtde-18 for PostgreSQL 18). The current baseline is Percona Server for …
Percona Postgres is a patched Postgres kernel with pg_tde (Transparent Data Encryption) extension. Since v4.4.0, Pigsty packages Percona PostgreSQL under /usr/pgtde-$v (/usr/pgtde-18 for PostgreSQL 18). The current baseline is Percona Server for …
Babelfish
Babelfish is a PostgreSQL-based SQL Server compatibility layer, open-sourced by AWS. Overview Deploy Babelfish in mssql mode to add these features to PostgreSQL: SQL Server wire protocol compatibility (TDS, 1433) T-SQL compatibility Unified …
Babelfish is a PostgreSQL-based SQL Server compatibility layer, open-sourced by AWS. Overview Deploy Babelfish in mssql mode to add these features to PostgreSQL: SQL Server wire protocol compatibility (TDS, 1433) T-SQL compatibility Unified …
PostgreSQL
PostgreSQL is a widely used open-source database. PostgreSQL 18 is the default, with current release baseline 18.7. PostgreSQL 14–18 are supported with 625 PG extensions. Quick Start Install Pigsty with fork/pgsql (conf/fork/pgsql.yml); -c pgsql and …
PostgreSQL is a widely used open-source database. PostgreSQL 18 is the default, with current release baseline 18.7. PostgreSQL 14–18 are supported with 625 PG extensions. Quick Start Install Pigsty with fork/pgsql (conf/fork/pgsql.yml); -c pgsql and …
Backup Mechanism
Pigsty’s backup and restore operations execute pgBackRest commands. For safe operation, understand the pgBackRest model and how Pigsty maps its orchestration parameters to native options. Core pgBackRest Concepts Stanza: the Cluster’s Backup Identity …
Pigsty’s backup and restore operations execute pgBackRest commands. For safe operation, understand the pgBackRest model and how Pigsty maps its orchestration parameters to native options. Core pgBackRest Concepts Stanza: the Cluster’s Backup Identity …
PostgreSQL Mongo Mode
The mongo template (conf/fork/mongo.yml, selected with -c mongo or -c fork/mongo) is a PostgreSQL deployment mode, not a standalone Pigsty module. It consists of: PostgreSQL 18 managed by the standard PGSQL module The documentdb extension and its …
The mongo template (conf/fork/mongo.yml, selected with -c mongo or -c fork/mongo) is a PostgreSQL deployment mode, not a standalone Pigsty module. It consists of: PostgreSQL 18 managed by the standard PGSQL module The documentdb extension and its …
Concepts
Pigsty is a portable, extensible, open-source PostgreSQL distribution. It uses declarative configuration and automation to build production database services in local environments. Its tools, scripts, and operating practices support PostgreSQL …
Pigsty is a portable, extensible, open-source PostgreSQL distribution. It uses declarative configuration and automation to build production database services in local environments. Its tools, scripts, and operating practices support PostgreSQL …
Compliance
Compliance requires continuous evidence of three elements: Configuration: Security controls must be enabled. Pigsty directly provides configuration. Process: The organization must establish access approval, change management, recovery exercises, and …
Compliance requires continuous evidence of three elements: Configuration: Security controls must be enabled. Pigsty directly provides configuration. Process: The organization must establish access approval, change management, recovery exercises, and …
Data Security
Network boundaries, authentication, and access control reduce incident risk. Data controls must limit damage and support recovery after hardware failure, leaked credentials, or operator errors. Data security must provide integrity, recoverability, …
Network boundaries, authentication, and access control reduce incident risk. Data controls must limit damage and support recovery after hardware failure, leaked credentials, or operator errors. Data security must provide integrity, recoverability, …
Encrypted Communication
TLS can provide transport encryption, server authentication, and client authentication. Configure each protection separately. Enabling server TLS does not make clients verify the server or make the server require client certificates. Most TLS …
TLS can provide transport encryption, server authentication, and client authentication. Configure each protection separately. Enabling server TLS does not make clients verify the server or make the server require client certificates. Most TLS …
Access Control
Authentication verifies identity. Authorization determines what that identity can do. PostgreSQL GRANT and REVOKE provide precise control. Privilege problems usually arise from missing default conventions. Examples include making an application …
Authentication verifies identity. Authorization determines what that identity can do. PostgreSQL GRANT and REVOKE provide precise control. Privilege problems usually arise from missing default conventions. Examples include making an application …
Authentication
pg_hba.conf defines PostgreSQL Host-Based Authentication. It controls who can connect, the source address, the database, and the required identity check. Manual HBA maintenance across a cluster requires care. Primary and replica rules can differ, and …
pg_hba.conf defines PostgreSQL Host-Based Authentication. It controls who can connect, the source address, the database, and the required identity check. Manual HBA maintenance across a cluster requires care. Primary and replica rules can differ, and …
Security Model
Identify the root of trust and defensive layers before selecting security features. The root of trust needs the strongest protection. Multiple layers preserve some protection if one fails. Trust Boundaries Pigsty uses Ansible for declarative …
Identify the root of trust and defensive layers before selecting security features. The root of trust needs the strongest protection. Multiple layers preserve some protection if one fails. Trust Boundaries Pigsty uses Ansible for declarative …
Security and Compliance
Databases usually store the most valuable and sensitive data in an information system. Attacks and failures can therefore have severe consequences. Security requires multiple controls: who can connect, what they can do, and whether traffic is …
Databases usually store the most valuable and sensitive data in an information system. Attacks and failures can therefore have severe consequences. Security requires multiple controls: who can connect, what they can do, and whether traffic is …
Service Access
Split read and write operations, route traffic correctly, and deliver PostgreSQL cluster capabilities reliably. A service exposes database cluster capabilities through a stable interface that hides the underlying cluster details. Services provide …
Split read and write operations, route traffic correctly, and deliver PostgreSQL cluster capabilities reliably. A service exposes database cluster capabilities through a stable interface that hides the underlying cluster details. Services provide …
Monitoring System
The built-in monitoring system provides metrics, logs, and alerting. Logs and alerts also support audit and traceability. It can monitor Pigsty-managed clusters, existing PostgreSQL clusters, and external RDS services. Monitoring Targets Pigsty …
The built-in monitoring system provides metrics, logs, and alerting. Logs and alerts also support audit and traceability. It can monitor Pigsty-managed clusters, existing PostgreSQL clusters, and external RDS services. Monitoring Targets Pigsty …
Use CMDB as Config Inventory
Use a PostgreSQL metabase as a dynamic configuration source instead of static YAML files. Overview A CMDB (Configuration Management Database) stores configuration in database tables. By default, Pigsty uses static pigsty.yml as the Ansible inventory. …
Use a PostgreSQL metabase as a dynamic configuration source instead of static YAML files. Overview A CMDB (Configuration Management Database) stores configuration in database tables. By default, Pigsty uses static pigsty.yml as the Ansible inventory. …
Conf Templates
The inventory defines the deployment through declarative configuration. Customize its pigsty.yml file for your requirements. New users can start with ready-to-use templates for common deployment scenarios. Each template is a predefined pigsty.yml …
The inventory defines the deployment through declarative configuration. Customize its pigsty.yml file for your requirements. New users can start with ready-to-use templates for common deployment scenarios. Each template is a predefined pigsty.yml …
PITR Scenarios
Decisions can consume much of the available incident response time. Pigsty automates recovery steps, but the operator must decide three things. Select the target, choose in-place or clone recovery, and define how to validate the result. Read and …
Decisions can consume much of the available incident response time. Pigsty automates recovery steps, but the operator must decide three things. Select the target, choose in-place or clone recovery, and define how to validate the result. Read and …
Declarative Recovery
A backup must support recovery when an incident occurs. Traditional PITR requires connected manual steps: pause HA, stop PostgreSQL, prepare recovery settings, restore the backup, and replay WAL. Then validate the target, rebuild metadata, and start …
A backup must support recovery when an incident occurs. Traditional PITR requires connected manual steps: pause HA, stop PostgreSQL, prepare recovery settings, restore the backup, and replay WAL. Then validate the target, rebuild metadata, and start …
PITR Tradeoffs
Backups require storage, network traffic, and operational work. They determine how much data you can recover and how quickly service returns. More history usually requires more capacity. A shorter RTO usually requires newer backups and tested …
Backups require storage, network traffic, and operational work. They determine how much data you can recover and how quickly service returns. More history usually requires more capacity. A shorter RTO usually requires newer backups and tested …
Parameters
Use inventory parameters to customize infrastructure settings and database configuration. Parameter List The files/cmdb.sql defaults define 399 public configuration parameters across 12 Pigsty modules. See Parameter Reference for the complete list. …
Use inventory parameters to customize infrastructure settings and database configuration. Parameter List The files/cmdb.sql defaults define 399 public configuration parameters across 12 Pigsty modules. See Parameter Reference for the complete list. …
Configure
The configure configuration wizard generates pigsty.yml for your current environment. This script is optional. If you know how to configure Pigsty, edit pigsty.yml directly and skip the wizard. Quick Start Enter the Pigsty source directory and run …
The configure configuration wizard generates pigsty.yml for your current environment. This script is optional. If you know how to configure Pigsty, edit pigsty.yml directly and skip the wizard. Quick Start Enter the Pigsty source directory and run …
PITR Architecture
The PITR principle is simple, but implementation must address several constraints. WAL archiving must not block production writes. Object storage backups need encryption. Backup jobs must follow the primary after failover, and shared repositories …
The PITR principle is simple, but implementation must address several constraints. WAL archiving must not block production writes. Object storage backups need encryption. Backup jobs must follow the primary after failover, and shared repositories …
How PITR Works
A database is a state machine. WAL (Write-Ahead Log) records its changes in order. PostgreSQL writes each change to WAL before applying it to data files. Keep a physical snapshot and all later WAL to replay the database to a selected consistent …
A database is a state machine. WAL (Write-Ahead Log) records its changes in order. PostgreSQL writes each change to WAL before applying it to data files. Keep a physical snapshot and all later WAL to replay the database to a selected consistent …
RTO Trade-offs
RTO (Recovery Time Objective) defines the maximum time required for the system to restore write capability when the primary fails. Critical transaction systems typically need the shortest practical RTO, often below one minute. Shorter RTO increases …
RTO (Recovery Time Objective) defines the maximum time required for the system to restore write capability when the primary fails. Critical transaction systems typically need the shortest practical RTO, often below one minute. Shorter RTO increases …
Point-in-Time Recovery — A Time Machine for PostgreSQL
Point-in-Time Recovery (PITR) can restore an earlier cluster state after accidental deletion of data, a table, or a database. Pigsty enables PITR in its standard PostgreSQL configuration. This work once required specialist DBA knowledge. Replication …
Point-in-Time Recovery (PITR) can restore an earlier cluster state after accidental deletion of data, a table, or a database. Pigsty enables PITR in its standard PostgreSQL configuration. This work once required specialist DBA knowledge. Replication …
PGSQL Arch
PGSQL organizes PostgreSQL as clusters. Each cluster is a logical group of database instances connected through primary-replica relationships. Overview The PGSQL module combines these components for production HA clusters: Component Type Description …
PGSQL organizes PostgreSQL as clusters. Each cluster is a logical group of database instances connected through primary-replica relationships. Overview The PGSQL module combines these components for production HA clusters: Component Type Description …
Infrastructure
Production HA PostgreSQL needs monitoring, alerts, logs, time synchronization, DNS, and software repositories. The INFRA module provides these services. It is optional but strongly recommended. Overview The following single-node deployment diagram …
Production HA PostgreSQL needs monitoring, alerts, logs, time synchronization, DNS, and software repositories. The INFRA module provides these services. It is optional but strongly recommended. Overview The following single-node deployment diagram …
High Availability
Overview Pigsty PostgreSQL clusters include HA through Patroni, Etcd, and HAProxy. A cluster with two or more instances gains automatic HA without extra configuration. A surviving instance can provide the complete database service. Clients can …
Overview Pigsty PostgreSQL clusters include HA through Patroni, Etcd, and HAProxy. A cluster with two or more instances gains automatic HA without extra configuration. A surviving instance can provide the complete database service. Clients can …
Infra as Code
Pigsty uses IaC and GitOps. Describe the environment in a declarative inventory. Apply it with idempotent playbooks. Declare the target state with parameters. Playbooks can repeatedly adjust nodes to that state. This resembles Kubernetes CRDs and …
Pigsty uses IaC and GitOps. Describe the environment in a declarative inventory. Apply it with idempotent playbooks. Declare the target state with parameters. Playbooks can repeatedly adjust nodes to that state. This resembles Kubernetes CRDs and …
HA multi datacenter
The high availability of a PostgreSQL cluster deployed in multiple data centers is based on replication, which can be synchronous or asynchronous (see replication modes). In both cases, it is important to be clear about the following concepts: …
The high availability of a PostgreSQL cluster deployed in multiple data centers is based on replication, which can be synchronous or asynchronous (see replication modes). In both cases, it is important to be clear about the following concepts: …
ER Model
A deployment is the largest entity in Pigsty. This entity-relationship diagram shows its main entities and their relationships: A deployment is also an environment. Examples include Production (Prod), User Acceptance Testing (UAT), Staging, Testing, …
A deployment is the largest entity in Pigsty. This entity-relationship diagram shows its main entities and their relationships: A deployment is also an environment. Examples include Production (Prod), User Acceptance Testing (UAT), Staging, Testing, …
Nodes
A node represents hardware resources and an operating system. It can be a physical server, virtual machine, container, or pod. A node needs a Linux OS, systemd, and standard CPU, memory, disk, and network resources. Install modules on nodes. The …
A node represents hardware resources and an operating system. It can be a physical server, virtual machine, container, or pod. A node needs a Linux OS, systemd, and standard CPU, memory, disk, and network resources. Install modules on nodes. The …
Security Considerations
A Patroni cluster has two interfaces to be protected from unauthorized access: the distributed configuration storage (DCS) and the Patroni REST API. Protecting DCS Patroni and patronictl both store and retrieve data to/from the DCS. Even when the …
A Patroni cluster has two interfaces to be protected from unauthorized access: the distributed configuration storage (DCS) and the Patroni REST API. Protecting DCS Patroni and patronictl both store and retrieve data to/from the DCS. Even when the …
Architecture
Pigsty uses a modular architecture and declarative interface. Combine modules to meet your requirements. Use one or more modules from the modular design. Describe the environment with a configuration inventory and parameters. Apply it with Ansible …
Pigsty uses a modular architecture and declarative interface. Combine modules to meet your requirements. Use one or more modules from the modular design. Describe the environment with a configuration inventory and parameters. Apply it with Ansible …
Integration with other tools
Patroni is able to integrate with other tools in your stack. In this section you will find a list of examples, which although not an exhaustive list, might provide you with ideas on how Patroni can integrate with other tools. Barman Patroni delivers …
Patroni is able to integrate with other tools in your stack. In this section you will find a list of examples, which although not an exhaustive list, might provide you with ideas on how Patroni can integrate with other tools. Barman Patroni delivers …
Citus support
Patroni makes it extremely simple to deploy Multi-Node Citus clusters. TL;DR There are only a few simple rules you need to follow: Citus database extension to PostgreSQL must be available on all nodes. Absolute minimum supported Citus version is …
Patroni makes it extremely simple to deploy Multi-Node Citus clusters. TL;DR There are only a few simple rules you need to follow: Citus database extension to PostgreSQL must be available on all nodes. Absolute minimum supported Citus version is …
DCS Failsafe Mode
The problem Patroni is heavily relying on Distributed Configuration Store (DCS) to solve the task of leader elections and detect network partitioning. That is, the node is allowed to run Postgres as the primary only if it can update the leader lock …
The problem Patroni is heavily relying on Distributed Configuration Store (DCS) to solve the task of leader elections and detect network partitioning. That is, the node is allowed to run Postgres as the primary only if it can update the leader lock …
Watchdog support
Having multiple PostgreSQL servers running as primary can result in transactions lost due to diverging timelines. This situation is also called a split-brain problem. To avoid split-brain Patroni needs to ensure PostgreSQL will not accept any …
Having multiple PostgreSQL servers running as primary can result in transactions lost due to diverging timelines. This situation is also called a split-brain problem. To avoid split-brain Patroni needs to ensure PostgreSQL will not accept any …
Project Metrics
Code Coverage pgBackRest aims to have complete function/branch/line coverage for the core C code in /src. Function/line coverage is complete with no exceptions. Branch coverage excludes branches inside macros and assert() calls. Macros have their …
Code Coverage pgBackRest aims to have complete function/branch/line coverage for the core C code in /src. Function/line coverage is complete with no exceptions. Branch coverage excludes branches inside macros and assert() calls. Macros have their …
Community
Tutorials How to Set Up PgBouncer for Postgres Plus Standard Server Good overview of PgBouncer concepts. What is the point of bouncing? Discusses differences between pooling modes. Support Project page at GitHub Issue tracker at GitHub PgBouncer …
Tutorials How to Set Up PgBouncer for Postgres Plus Standard Server Good overview of PgBouncer concepts. What is the point of bouncing? Discusses differences between pooling modes. Support Project page at GitHub Issue tracker at GitHub PgBouncer …
Replication modes
Patroni uses PostgreSQL streaming replication. For more information about streaming replication, see the Postgres documentation. By default Patroni configures PostgreSQL for asynchronous replication. Choosing your replication schema is dependent on …
Patroni uses PostgreSQL streaming replication. For more information about streaming replication, see the Postgres documentation. By default Patroni configures PostgreSQL for asynchronous replication. Choosing your replication schema is dependent on …
E-R Model of Redis Cluster
The Redis module organizes production Redis into clusters. A cluster is a logical entity with Redis instances on one or more nodes. Each cluster is an autonomous, high-performance cache or storage unit with at least one Redis instance. It exposes …
The Redis module organizes production Redis into clusters. A cluster is a logical entity with Redis instances on one or more nodes. Each cluster is an autonomous, high-performance cache or storage unit with at least one Redis instance. It exposes …
MINIO Cluster Model
MINIO is Pigsty’s compatibility module name for object storage. Pigsty v4.6.0 deploys Silo through minio_type: silo, organizing storage instances into clusters. Each cluster is an autonomous S3-compatible object store with at least one instance. It …
MINIO is Pigsty’s compatibility module name for object storage. Pigsty v4.6.0 deploys Silo through minio_type: silo, organizing storage instances into clusters. Each cluster is an autonomous S3-compatible object store with at least one instance. It …
Network Partition
RTO Timeline Failure Model Phase Best Worst Average Notes Demote retry loop + retry loop/2 + retry Patroni retries after detecting partition, demotes after timeout Lease Expiration ttl - loop - retry ttl - loop - retry ttl - loop - retry Remaining …
RTO Timeline Failure Model Phase Best Worst Average Notes Demote retry loop + retry loop/2 + retry Patroni retries after detecting partition, demotes after timeout Lease Expiration ttl - loop - retry ttl - loop - retry ttl - loop - retry Remaining …
E-R Model of Etcd Cluster
The ETCD module organizes production ETCD into clusters. A cluster is a logical entity whose ETCD instances coordinate through the Raft consensus protocol. Each cluster is an autonomous distributed key-value store with at least one ETCD instance. It …
The ETCD module organizes production ETCD into clusters. A cluster is a logical entity whose ETCD instances coordinate through the Raft consensus protocol. Each cluster is an autonomous distributed key-value store with at least one ETCD instance. It …
Failure Model
Patroni failures have 10 categories by failure target. Detection paths group them into five categories, described here. # Failure Scenario Description Final Path 1 PG process crash crash, OOM killed Active Detection 2 PG connection refused …
Patroni failures have 10 categories by failure target. Detection paths group them into five categories, described here. # Failure Scenario Description Final Path 1 PG process crash crash, OOM killed Active Detection 2 PG connection refused …
E-R Model of PostgreSQL Cluster
PGSQL organizes PostgreSQL as clusters. Each cluster is a logical group of database instances connected through primary-replica relationships. Each cluster is an autonomous business unit with at least one primary instance. It exposes database …
PGSQL organizes PostgreSQL as clusters. Each cluster is a logical group of database instances connected through primary-replica relationships. Each cluster is an autonomous business unit with at least one primary instance. It exposes database …
Introduction
PIG is a command-line tool for installing and managing PostgreSQL and its extensions. It maps extension names to RPM or DEB packages and uses apt, dnf, or yum to install them. The catalog contains 625 extension entries. PIG selects package names for …
PIG is a command-line tool for installing and managing PostgreSQL and its extensions. It maps extension names to RPM or DEB packages and uses apt, dnf, or yum to install them. The catalog contains 625 extension entries. PIG selects package names for …
Model of Patroni Active Failure
RTO Timeline Failure Model Item Best Worst Average Description Crash Found 0 loop loop/2 Best: PG crashes right before checkWorst: PG crashes right after check Restart Timeout 0 start start Best: PG recovers instantlyWorst: Wait full start timeout …
RTO Timeline Failure Model Item Best Worst Average Description Crash Found 0 loop loop/2 Best: PG crashes right before checkWorst: PG crashes right after check Restart Timeout 0 start start Best: PG recovers instantlyWorst: Wait full start timeout …
RPO Trade-offs
RPO (Recovery Point Objective) defines the maximum amount of data loss allowed when the primary fails. Critical data, such as financial transactions, typically requires RPO = 0: no data loss. Stricter RPO targets increase write latency and reduce …
RPO (Recovery Point Objective) defines the maximum amount of data loss allowed when the primary fails. Critical data, such as financial transactions, typically requires RPO = 0: no data loss. Stricter RPO targets increase write latency and reduce …
Introduction
Patroni is a template for high availability (HA) PostgreSQL solutions using Python. Patroni originated as a fork of Governor, the project from Compose. It includes plenty of new features. For additional background info, see: PostgreSQL HA with …
Patroni is a template for high availability (HA) PostgreSQL solutions using Python. Patroni originated as a fork of Governor, the project from Compose. It includes plenty of new features. For additional background info, see: PostgreSQL HA with …
E-R Model of Infra Cluster
The INFRA module is a management hub made of infrastructure nodes, rather than a traditional cluster. It provides core services for the deployment. Each node is an autonomous service unit that runs components such as Nginx, Grafana, and …
The INFRA module is a management hub made of infrastructure nodes, rather than a traditional cluster. It provides core services for the deployment. Each node is an autonomous service unit that runs components such as Nginx, Grafana, and …
Features
Several levels of brutality when rotating connections: Session pooling Most polite method. When a client connects, a server connection will be assigned to it for the whole duration it stays connected. When the client disconnects, the server …
Several levels of brutality when rotating connections: Session pooling Most polite method. When a client connects, a server connection will be assigned to it for the whole duration it stays connected. When the client disconnects, the server …
Model of Patroni Passive Failure
RTO Timeline Failure Model Phase Best Worst Average Description Lease Expiration ttl - loop ttl ttl - loop/2 Best: crash just before refreshWorst: crash right after refresh Replica Detect 0 loop loop / 2 Best: exactly at check pointWorst: just …
RTO Timeline Failure Model Phase Best Worst Average Description Lease Expiration ttl - loop ttl ttl - loop/2 Best: crash just before refreshWorst: crash right after refresh Replica Detect 0 loop loop / 2 Best: exactly at check pointWorst: just …