<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Patroni 4.1.5 Documentation on PIG.CENTER</title><link>https://pig.center/docs/patroni/</link><description>Recent content in Patroni 4.1.5 Documentation on PIG.CENTER</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Tue, 08 Sep 2026 21:29:01 +0800</lastBuildDate><atom:link href="https://pig.center/docs/patroni/index.xml" rel="self" type="application/rss+xml"/><item><title>Introduction</title><link>https://pig.center/docs/patroni/readme/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/readme/</guid><description>&lt;p&gt;&lt;a id="readme"&gt;&lt;/a&gt;&#10;Patroni is a template for high availability (HA) PostgreSQL solutions using Python. Patroni originated as a fork of &lt;a href="https://github.com/compose/governor"&gt;Governor&lt;/a&gt;&#10;, the project from Compose. It includes plenty of new features.&lt;/p&gt;&#10;&lt;p&gt;For additional background info, see:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=iruaCgeG7qs"&gt;PostgreSQL HA with Kubernetes and Patroni&lt;/a&gt;&#10;, talk by Josh Berkus at KubeCon 2016 (video)&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://engineering.zalando.com/posts/2016/02/zalandos-patroni-a-template-for-high-availability-postgresql.html"&gt;Feb. 2016 Zalando Tech blog post&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="development-status"&gt;Development Status&#10;&lt;/h2&gt;&#10;&lt;p&gt;Patroni is in active development and accepts contributions. See our &lt;a href="https://pig.center/docs/patroni/contributing_guidelines/#contributing_guidelines"&gt;Contributing&lt;/a&gt;&#10; section below for more details.&lt;/p&gt;</description></item><item><title>Installation</title><link>https://pig.center/docs/patroni/installation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/installation/</guid><description>&lt;p&gt;&lt;a id="installation"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="pre-requirements-for-mac-os"&gt;Pre-requirements for Mac OS&#10;&lt;/h2&gt;&#10;&lt;p&gt;To install requirements on a Mac, run the following:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-56dac928-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-56dac928-fence-0-viewport" data-td-code-viewport&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;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&lt;a id="psycopg2_install_options"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="psycopg"&gt;Psycopg&#10;&lt;/h2&gt;&#10;&lt;p&gt;Starting from &lt;a href="https://www.psycopg.org/articles/2019/04/04/psycopg-28-released/"&gt;psycopg2-2.8&lt;/a&gt;&#10; 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>Patroni REST API</title><link>https://pig.center/docs/patroni/rest_api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/rest_api/</guid><description>&lt;p&gt;&lt;a id="rest_api"&gt;&lt;/a&gt;&#10;Patroni has a rich REST API, which is used by Patroni itself during the leader race, by the &lt;a href="https://pig.center/docs/patroni/patronictl/#patronictl"&gt;patronictl&lt;/a&gt;&#10; tool in order to perform failovers/switchovers/reinitialize/restarts/reloads, by HAProxy or any other kind of load balancer to perform HTTP health checks, and of course could also be used for monitoring. Below you will find the list of Patroni REST API endpoints.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="health-check-endpoints"&gt;Health check endpoints&#10;&lt;/h2&gt;&#10;&lt;p&gt;For all health check &lt;code&gt;GET&lt;/code&gt; requests Patroni returns a JSON document with the status of the node, along with the HTTP status code. If you don&amp;rsquo;t want or don&amp;rsquo;t need the JSON document, you might consider using the &lt;code&gt;HEAD&lt;/code&gt; or &lt;code&gt;OPTIONS&lt;/code&gt; method instead of &lt;code&gt;GET&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>patronictl</title><link>https://pig.center/docs/patroni/patronictl/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/patronictl/</guid><description>&lt;p&gt;&lt;a id="patronictl_version_description"&gt;&lt;/a&gt;&#10;&lt;a id="patronictl_version_parameters"&gt;&lt;/a&gt;&#10;&lt;a id="patronictl_version_examples"&gt;&lt;/a&gt;&#10;&lt;a id="patronictl"&gt;&lt;/a&gt;&#10;Patroni has a command-line interface named &lt;a href="https://pig.center/docs/patroni/patronictl/#patronictl"&gt;patronictl&lt;/a&gt;&#10;, which is used basically to interact with Patroni&amp;rsquo;s REST API and with the DCS. It is intended to make it easier to perform operations in the cluster, and can easily be used by humans or scripts.&lt;/p&gt;&#10;&lt;p&gt;&lt;a id="patronictl_configuration"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="configuration"&gt;Configuration&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;a href="https://pig.center/docs/patroni/patronictl/#patronictl"&gt;patronictl&lt;/a&gt;&#10; uses 3 sections of the configuration:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;ctl&lt;/strong&gt;: how to authenticate against the Patroni REST API, and how to validate the server identity. Refer to &lt;a href="https://pig.center/docs/patroni/config/yaml/#patronictl_settings"&gt;ctl settings&lt;/a&gt;&#10; for more details;&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;restapi&lt;/strong&gt;: how to authenticate against the Patroni REST API, and how to validate the server identity. Only used if &lt;code&gt;ctl&lt;/code&gt; configuration is not enough. &lt;a href="https://pig.center/docs/patroni/patronictl/#patronictl"&gt;patronictl&lt;/a&gt;&#10; is mainly interested in &lt;code&gt;restapi.authentication&lt;/code&gt; section (in case &lt;code&gt;ctl.authentication&lt;/code&gt; is missing) and &lt;code&gt;restapi.cafile&lt;/code&gt; setting (in case &lt;code&gt;ctl.cacert&lt;/code&gt; is missing). Refer to &lt;a href="https://pig.center/docs/patroni/config/yaml/#restapi_settings"&gt;REST API settings&lt;/a&gt;&#10; for more details;&lt;/li&gt;&#10;&lt;li&gt;DCS (e.g. &lt;strong&gt;etcd&lt;/strong&gt;): how to contact and authenticate against the DCS used by Patroni.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Those configuration options can come either from environment variables or from a configuration file. Look for the above sections in &lt;a href="https://pig.center/docs/patroni/config/env/#env"&gt;Environment Configuration Settings&lt;/a&gt;&#10; or &lt;a href="https://pig.center/docs/patroni/config/yaml/#yaml"&gt;YAML Configuration Settings&lt;/a&gt;&#10; to understand how you can set the options for them through environment variables or through a configuration file.&lt;/p&gt;</description></item><item><title>Replica imaging and bootstrap</title><link>https://pig.center/docs/patroni/replica_bootstrap/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/replica_bootstrap/</guid><description>&lt;p&gt;&lt;a id="replica_imaging_and_bootstrap"&gt;&lt;/a&gt;&#10;Patroni allows customizing creation of a new replica. It also supports defining what happens when the new empty cluster is being bootstrapped. The distinction between two is well defined: Patroni creates replicas only if the &lt;code&gt;initialize&lt;/code&gt; key is present in DCS for the cluster. If there is no &lt;code&gt;initialize&lt;/code&gt; key - Patroni calls bootstrap exclusively on the first node that takes the initialize key lock.&lt;/p&gt;&#10;&lt;p&gt;&lt;a id="custom_bootstrap"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="bootstrap"&gt;Bootstrap&#10;&lt;/h2&gt;&#10;&lt;p&gt;PostgreSQL provides &lt;code&gt;initdb&lt;/code&gt; command to initialize a new cluster and Patroni calls it by default. In certain cases, particularly when creating a new cluster as a copy of an existing one, it is necessary to replace a built-in method with custom actions. Patroni supports executing user-defined scripts to bootstrap new clusters, supplying some required arguments to them, i.e. the name of the cluster and the path to the data directory. This is configured in the &lt;code&gt;bootstrap&lt;/code&gt; section of the Patroni configuration. For example:&lt;/p&gt;</description></item><item><title>Replication modes</title><link>https://pig.center/docs/patroni/replication_modes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/replication_modes/</guid><description>&lt;p&gt;&lt;a id="replication_modes"&gt;&lt;/a&gt;&#10;Patroni uses PostgreSQL streaming replication. For more information about streaming replication, see the &lt;a href="http://www.postgresql.org/docs/current/static/warm-standby.html#STREAMING-REPLICATION"&gt;Postgres documentation&lt;/a&gt;&#10;. By default Patroni configures PostgreSQL for asynchronous replication. Choosing your replication schema is dependent on your business considerations. Investigate both async and sync replication, as well as other HA solutions, to determine which solution is best for you.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="asynchronous-mode-durability"&gt;Asynchronous mode durability&#10;&lt;/h2&gt;&#10;&lt;p&gt;In asynchronous mode the cluster is allowed to lose some committed transactions to ensure availability. When the primary server fails or becomes unavailable for any other reason Patroni will automatically promote a sufficiently healthy standby to primary. Any transactions that have not been replicated to that standby remain in a &amp;ldquo;forked timeline&amp;rdquo; on the primary, and are effectively unrecoverable&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;</description></item><item><title>Standby cluster</title><link>https://pig.center/docs/patroni/standby_cluster/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/standby_cluster/</guid><description>&lt;p&gt;&lt;a id="standby_cluster"&gt;&lt;/a&gt;&#10;Patroni also support running cascading replication to a remote datacenter (region) using a feature that is called &amp;ldquo;standby cluster&amp;rdquo;. This type of clusters has:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&amp;ldquo;standby leader&amp;rdquo;, that behaves pretty much like a regular cluster leader, except it replicates from a remote node.&lt;/li&gt;&#10;&lt;li&gt;cascade replicas, that are replicating from standby leader.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Standby leader holds and updates a leader lock in DCS. If the leader lock expires, cascade replicas will perform an election to choose another leader from the standbys.&lt;/p&gt;</description></item><item><title>Watchdog support</title><link>https://pig.center/docs/patroni/watchdog/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/watchdog/</guid><description>&lt;p&gt;&lt;a id="watchdog"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;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 transaction commits after leader key expires in the DCS. Under normal circumstances Patroni will try to achieve this by stopping PostgreSQL when leader lock update fails for any reason. However, this may fail to happen due to various reasons:&lt;/p&gt;</description></item><item><title>Pause/Resume mode for the cluster</title><link>https://pig.center/docs/patroni/pause/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/pause/</guid><description>&lt;p&gt;&lt;a id="pause"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="the-goal"&gt;The goal&#10;&lt;/h2&gt;&#10;&lt;p&gt;Under certain circumstances Patroni needs to temporarily step down from managing the cluster, while still retaining the cluster state in DCS. Possible use cases are uncommon activities on the cluster, such as major version upgrades or corruption recovery. During those activities nodes are often started and stopped for reasons unknown to Patroni, some nodes can be even temporarily promoted, violating the assumption of running only one primary. Therefore, Patroni needs to be able to &amp;ldquo;detach&amp;rdquo; from the running cluster, implementing an equivalent of the maintenance mode in Pacemaker.&lt;/p&gt;</description></item><item><title>DCS Failsafe Mode</title><link>https://pig.center/docs/patroni/dcs_failsafe_mode/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/dcs_failsafe_mode/</guid><description>&lt;p&gt;&lt;a id="dcs_failsafe_mode"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="the-problem"&gt;The problem&#10;&lt;/h2&gt;&#10;&lt;p&gt;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 in DCS. In case the update of the leader lock fails, Postgres is immediately demoted and started as read-only. Depending on which DCS is used, the chances of hitting the &amp;ldquo;problem&amp;rdquo; differ. For example, with Etcd which is only used for Patroni, chances are close to zero, while with K8s API (backed by Etcd) it could be observed more frequently.&lt;/p&gt;</description></item><item><title>Using Patroni with Kubernetes</title><link>https://pig.center/docs/patroni/kubernetes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/kubernetes/</guid><description>&lt;p&gt;&lt;a id="kubernetes"&gt;&lt;/a&gt;&#10;Patroni can use Kubernetes objects in order to store the state of the cluster and manage the leader key. That makes it capable of operating Postgres in Kubernetes environment without any consistency store, namely, one doesn&amp;rsquo;t need to run an extra Etcd deployment. There are two different type of Kubernetes objects Patroni can use to store the leader and the configuration keys, they are configured with the &lt;code&gt;kubernetes.use_endpoints&lt;/code&gt; or &lt;code&gt;PATRONI_KUBERNETES_USE_ENDPOINTS&lt;/code&gt; environment variable.&lt;/p&gt;</description></item><item><title>Citus support</title><link>https://pig.center/docs/patroni/citus/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/citus/</guid><description>&lt;p&gt;&lt;a id="citus"&gt;&lt;/a&gt;&#10;Patroni makes it extremely simple to deploy &lt;a href="https://docs.citusdata.com/en/stable/installation/multi_node.html"&gt;Multi-Node Citus&lt;/a&gt;&#10; clusters.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="tldr"&gt;TL;DR&#10;&lt;/h2&gt;&#10;&lt;p&gt;There are only a few simple rules you need to follow:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/citusdata/citus"&gt;Citus&lt;/a&gt;&#10; database extension to PostgreSQL must be available on all nodes. Absolute minimum supported Citus version is 10.0, but, to take all benefits from transparent switchovers and restarts of workers we recommend using at least Citus 11.2.&lt;/li&gt;&#10;&lt;li&gt;Cluster name (&lt;code&gt;scope&lt;/code&gt;) must be the same for all Citus nodes!&lt;/li&gt;&#10;&lt;li&gt;Superuser credentials must be the same on coordinator and all worker nodes, and &lt;code&gt;pg_hba.conf&lt;/code&gt; should allow superuser access between all nodes.&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://pig.center/docs/patroni/config/yaml/#restapi_settings"&gt;REST API&lt;/a&gt;&#10; access should be allowed from worker nodes to the coordinator. E.g., credentials should be the same and if configured, client certificates from worker nodes must be accepted by the coordinator.&lt;/li&gt;&#10;&lt;li&gt;Add the following section to the &lt;code&gt;patroni.yaml&lt;/code&gt;:&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-587d891b-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="yaml" data-td-line-count="3"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-587d891b-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;citus&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;X &lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# 0 for coordinator and 1, 2, 3, etc for workers&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;database&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;citus &lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# must be the same on all nodes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;After that you just need to start Patroni and it will handle the rest:&lt;/p&gt;</description></item><item><title>Convert a Standalone to a Patroni Cluster</title><link>https://pig.center/docs/patroni/existing_data/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/existing_data/</guid><description>&lt;p&gt;&lt;a id="existing_data"&gt;&lt;/a&gt;&#10;This section describes the process for converting a standalone PostgreSQL instance into a Patroni cluster.&lt;/p&gt;&#10;&lt;p&gt;To deploy a Patroni cluster without using a pre-existing PostgreSQL instance, see &lt;a href="https://pig.center/docs/patroni/readme/#running_configuring"&gt;Running and Configuring&lt;/a&gt;&#10; instead.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="procedure"&gt;Procedure&#10;&lt;/h2&gt;&#10;&lt;p&gt;You can find below an overview of steps for converting an existing Postgres cluster to a Patroni managed cluster. In the steps we assume all nodes that are part of the existing cluster are currently up and running, and that you &lt;em&gt;do not&lt;/em&gt; intend to change Postgres configuration while the migration is ongoing. The steps:&lt;/p&gt;</description></item><item><title>Integration with other tools</title><link>https://pig.center/docs/patroni/tools_integration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/tools_integration/</guid><description>&lt;p&gt;&lt;a id="tools_integration"&gt;&lt;/a&gt;&#10;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.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="barman"&gt;Barman&#10;&lt;/h2&gt;&#10;&lt;p&gt;Patroni delivers an application named &lt;code&gt;patroni_barman&lt;/code&gt; which has logic to communicate with &lt;code&gt;pg-backup-api&lt;/code&gt;, so you are able to perform Barman operations remotely.&lt;/p&gt;&#10;&lt;p&gt;This application currently has a couple of sub-commands: &lt;code&gt;recover&lt;/code&gt; and &lt;code&gt;config-switch&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Security Considerations</title><link>https://pig.center/docs/patroni/security/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/security/</guid><description>&lt;p&gt;&lt;a id="security"&gt;&lt;/a&gt;&#10;A Patroni cluster has two interfaces to be protected from unauthorized access: the distributed configuration storage (DCS) and the Patroni REST API.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="protecting-dcs"&gt;Protecting DCS&#10;&lt;/h2&gt;&#10;&lt;p&gt;Patroni and &lt;a href="https://pig.center/docs/patroni/patronictl/#patronictl"&gt;patronictl&lt;/a&gt;&#10; both store and retrieve data to/from the DCS.&lt;/p&gt;&#10;&lt;p&gt;Despite DCS doesn&amp;rsquo;t contain any sensitive information, it allows changing some of Patroni/Postgres configuration. Therefore the very first thing that should be protected is DCS itself.&lt;/p&gt;&#10;&lt;p&gt;The details of protection depend on the type of DCS used. The authentication and encryption parameters (tokens/basic-auth/client certificates) for the supported types of DCS are covered in &lt;a href="https://pig.center/docs/patroni/config/yaml/#yaml"&gt;settings&lt;/a&gt;&#10;.&lt;/p&gt;</description></item><item><title>HA multi datacenter</title><link>https://pig.center/docs/patroni/ha_multi_dc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/ha_multi_dc/</guid><description>&lt;p&gt;&lt;a id="ha_multi_dc"&gt;&lt;/a&gt;&#10;The high availability of a PostgreSQL cluster deployed in multiple data centers is based on replication, which can be synchronous or asynchronous (see &lt;a href="https://pig.center/docs/patroni/replication_modes/#replication_modes"&gt;replication modes&lt;/a&gt;&#10;).&lt;/p&gt;&#10;&lt;p&gt;In both cases, it is important to be clear about the following concepts:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Postgres can run as primary or standby leader only when it owns the leading key and can update the leading key.&lt;/li&gt;&#10;&lt;li&gt;You should run the odd number of etcd, ZooKeeper or Consul nodes: 3 or 5!&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="synchronous-replication"&gt;Synchronous Replication&#10;&lt;/h2&gt;&#10;&lt;p&gt;To have a multi DC cluster that can automatically tolerate a zone drop, a minimum of 3 is required.&lt;/p&gt;</description></item><item><title>FAQ</title><link>https://pig.center/docs/patroni/faq/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/faq/</guid><description>&lt;p&gt;&lt;a id="faq"&gt;&lt;/a&gt;&#10;In this section you will find answers for the most frequently asked questions about Patroni. Each sub-section attempts to focus on different kinds of questions.&lt;/p&gt;&#10;&lt;p&gt;We hope that this helps you to clarify most of your questions. If you still have further concerns or find yourself facing an unexpected issue, please refer to &lt;a href="https://pig.center/docs/patroni/contributing_guidelines/#chatting"&gt;chatting&lt;/a&gt;&#10; and &lt;a href="https://pig.center/docs/patroni/contributing_guidelines/#reporting_bugs"&gt;reporting_bugs&lt;/a&gt;&#10; for instructions on how to get help or report issues.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="comparison-with-other-ha-solutions"&gt;Comparison with other HA solutions&#10;&lt;/h2&gt;&#10;&lt;p&gt;Why does Patroni require a separate cluster of DCS nodes while other solutions like &lt;code&gt;repmgr&lt;/code&gt; do not?&lt;br&gt;&#10;There are different ways of implementing HA solutions, each of them with their pros and cons.&lt;/p&gt;</description></item><item><title>Release notes</title><link>https://pig.center/docs/patroni/releases/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/releases/</guid><description>&lt;p&gt;&lt;a id="releases"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="version-415"&gt;Version 4.1.5&#10;&lt;/h2&gt;&#10;&lt;p&gt;Released 2026-08-12&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Compatibility improvements&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Compatibility with PostgreSQL 14.24, 15.19, 16.15, 17.11, 18.6 (Alexander Kukushkin)&lt;/p&gt;&#10;&lt;p&gt;Add the new &lt;code&gt;output_plugin_libraries&lt;/code&gt; GUC, which restricts logical decoding output plugins.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;strong&gt;Improvements&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Log REST API connection resets at &lt;code&gt;DEBUG&lt;/code&gt; instead of &lt;code&gt;WARNING&lt;/code&gt; (Kyle McLaren)&lt;/p&gt;&#10;&lt;p&gt;Ensure the common &amp;ldquo;client went away mid-write&amp;rdquo; variants are silenced without affecting the handling of genuine (non-connection) errors.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;strong&gt;Bugfixes&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Fix &lt;code&gt;thread_stack_size&lt;/code&gt; validation alignment (Sundong Kim)&lt;/p&gt;</description></item><item><title>Contributing guidelines</title><link>https://pig.center/docs/patroni/contributing_guidelines/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pig.center/docs/patroni/contributing_guidelines/</guid><description>&lt;p&gt;&lt;a id="contributing_guidelines"&gt;&lt;/a&gt;&#10;&lt;a id="chatting"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="chatting"&gt;Chatting&#10;&lt;/h2&gt;&#10;&lt;p&gt;If you have a question, looking for an interactive troubleshooting help or want to chat with other Patroni users, join us on channel &lt;a href="https://postgresteam.slack.com/archives/C9XPYG92A"&gt;#patroni&lt;/a&gt;&#10; in the &lt;a href="https://pgtreats.info/slack-invite"&gt;PostgreSQL Slack&lt;/a&gt;&#10;.&lt;/p&gt;&#10;&lt;p&gt;&lt;a id="reporting_bugs"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="reporting-bugs"&gt;Reporting bugs&#10;&lt;/h2&gt;&#10;&lt;p&gt;Before reporting a bug please make sure to &lt;strong&gt;reproduce it with the latest Patroni version&lt;/strong&gt;! Also please double check if the issue already exists in our &lt;a href="https://github.com/patroni/patroni/issues"&gt;Issues Tracker&lt;/a&gt;&#10;.&lt;/p&gt;&#10;&lt;hr&gt;&#10;&lt;h2 id="running-tests"&gt;Running tests&#10;&lt;/h2&gt;&#10;&lt;p&gt;Requirements for running behave tests:&lt;/p&gt;</description></item></channel></rss>