Questions tagged [patroni]

Patroni is a cluster management software for PostgreSQL that provides automatic failover for high availability. It uses PostgreSQL streaming replication and a third-party distributed consensus store. Use this tag for questions about Patroni code and its usage or for questions about software architecture involving PostgreSQL high availability.

Patroni is a solution that can use , , or as its distributed consensus store. This holds the shared configuration and is used to determine which nodes are available and who should be the streaming replication primary.

Patroni manages the PostgreSQL servers on each node, initializing and promoting them as required. Managing the cluster and the PostgreSQL is done with the patronictl command.

Resources:

54 questions
3
votes
1 answer

Pod name resolution for StatefulSet doesn't work

I have the following Kubernetes YAML with a StatefulSet I use to deploy a PostgreSQL cluster with Patroni. However, the question is relative to how Kubernetes registers Pod names in CoreDNS. According to this documentation in the Stable Network ID…
2
votes
1 answer

CRITICAL: system ID mismatch, node belongs to a different cluster: 6859654378827691778 != 6859654951670505099

i installed a patroni master node and need to create a pgbackrest replica the master node state is running but the slave node is stopped then it disappear because it looks like it belongs to another database identifier, when i try to run restore…
rabeb soltani
  • 41
  • 1
  • 3
2
votes
1 answer

Can you change pg_hba.conf using patronictl?

If you want to change pg_hba.conf in an existing patroni cluster. Can you do it via patronictl or do you have to signal one by one? The code does not seem to have it after a quick look
Pavlo Golub
  • 359
  • 5
  • 13
2
votes
0 answers

How to design my Geo-Distributed Postgres database cluster?

Our business have a PostgreSQL DB cluster running in China, managed by Patroni with 1 master node and 4 slave nodes. Now as business expanded to Europe, we are planning to setup another cluster there. The question is how to manage/sync two master…
liding
  • 752
  • 9
  • 21
1
vote
0 answers

How to connect to Patroni using golang

I have an application that connects to a PostgreSQL database. package main import ( "database/sql" "fmt" "log" _ "github.com/lib/pq" ) func main() { connectionString := "host= port= user=
Violetta
  • 509
  • 4
  • 12
1
vote
1 answer

DC-DR Sync issue in Patroni PostgreSQL setup

We have a 3 instance cluster in DC and a 3 instance cluster in DR as standby_cluster. For DC-DR real-time sync, we have added the DC cluster's leader's IP as standby_cluster IP in the DR patroni config. which is working fine and we are getting…
Rahi Shah
  • 11
  • 1
1
vote
1 answer

How to use physical and logical replication in Patroni together?

I want to construct cluster like this: 3 MAIN nodes linked by physical replication N OTHER nodes that receiving data from MAIN nodes via logical replication I successfully configured physical replication between 3 MAIN nodes, but I did't go far. I…
1
vote
0 answers

patroni returning 503 on 8008 check in haproxy

I'm doing a test of a patroni cluster before implementing in production. I have almost identical configs on my two patroni/postgresql servers, save for IP addresses. Haproxy shows that my second box is always down, and returns the following: Dec 31…
Larry G. Wapnitsky
  • 1,216
  • 2
  • 16
  • 35
1
vote
1 answer

Patroni: synchronous_mode vs maximum_lag_on_failover

Here is documentation of Patroni https://patroni.readthedocs.io/en/latest/replication_modes.html. There are two options: maximum_lag_on_failover and synchronous_mode. In the project, I see these two options are set (synchronous_mode: true, …
1
vote
0 answers

FATAL: role "root" does not exist error in Patroni Helm Chart while creating db schema automatically through Helm Chart

I am using patroni helm chart. There is no facility to create schema automatically. So I provided a ConfigMap as below: kind: ConfigMap apiVersion: v1 metadata: name: {{ template "patroni.fullname" . }} labels: app: {{ template…
Apurva
  • 63
  • 1
  • 6
1
vote
1 answer

The PostgreSQL service on standby node starts and stops again and again after Patroni started up

The PostgreSQL service on the standby node of my PostgreSQL cluster starts and stops again and again after I started the Patroni service. I want to build a PostgreSQL HA cluster on two computers using Patroni 1.6.4 and etcd 3.3. Firstly, I built an…
xuange
  • 57
  • 1
  • 10
1
vote
1 answer

wal-g backup-push tries to use wrong database

When trying to use wal-g with Patroni, I've got the following configuration as the Postgres section of patroni.yml: postgresql: use_pg_rewind: true use_slots: true parameters: wal_level: logical hot_standby: "on" …
NealeU
  • 1,264
  • 11
  • 23
1
vote
0 answers

error accessing postgres container from remote host

I have a postgres docker cluster running in a docker swarm environment with an overlay network. everything looks fine until when I try accessing the created container from a remote host with this command psql -h -p -U . I'm setting up the postgres…
polycarp royal
  • 95
  • 1
  • 2
  • 10
1
vote
2 answers

Failed to run patroni

I have follow this tutorial: https://linode.com/docs/databases/postgresql/create-a-highly-available-postgresql-cluster-using-patroni-and-haproxy/ , in order to set up Highly Available PostgreSQL Cluster Using Patroni and HAProxy. But when I try to…
e7lT2P
  • 1,635
  • 5
  • 31
  • 57
1
vote
2 answers

What is the consistency of Postgresql HA cluster with Patroni?

What is the consistency of Postgresql HA cluster with Patroni? My understanding is that because the fail-over is using a consensus (etc or zookeeper) the system will stay consistent under network partition. Does this mean that transaction running…
skyde
  • 2,816
  • 4
  • 34
  • 53
1
2 3 4