Questions tagged [patroni]

Patroni is a template for PostgreSQL high availability.

Patroni is a template for you to create your own customized, high-availability solution using Python and - for maximum accessibility - a distributed configuration store like ZooKeeper, etcd, Consul or Kubernetes. Database engineers, DBAs, DevOps engineers, and SREs who are looking to quickly deploy HA PostgreSQL in the datacenter-or anywhere else-will hopefully find it useful.

We call Patroni a 'template' because it is far from being a one-size-fits-all or plug-and-play replication system. It will have its own caveats. Use wisely.

Note to Kubernetes users: Patroni can run natively on top of Kubernetes. Take a look at the Kubernetes chapter of the Patroni documentation.

source: https://github.com/zalando/patroni

29 questions
7
votes
1 answer

Could not receive data from WAL stream: ERROR: requested WAL segment has already been removed

Configuration: Postgres 9.6 with a 3 cluster node. db1 is the master, db2 and db3 are replicas. WAL files are archived in AWS S3 using custom pgrsync tool. Cluster managed by patroni. The archive_command and restore_command is properly configured on…
rsmoorthy
  • 157
  • 1
  • 1
  • 9
4
votes
2 answers

Patroni : How to handle a replica which has been disconnected from primary for long time?

Let's say I am using asynchronous streaming replication with the below configuration in a 3 node cluster with Postgres 10.4 and Patroni 1.4.4 bootstrap: dcs: ttl: 30 loop_wait: 10 retry_timeout: 10 …
tuk
  • 1,263
  • 1
  • 15
  • 22
3
votes
0 answers

psql: FATAL: the database system is starting up

I'm running into this message but not able to make heads or tails out of why it's throwing this: -bash-4.2$ /usr/pgsql-10/bin/postgres -D /data/patroni --config-file=/data/patroni/postgresql.conf 2019-05-23 08:26:34.561 EDT [10101] LOG: listening…
Tom K
  • 31
  • 1
  • 1
  • 3
2
votes
1 answer

High Available PostgreSQL with Patroni and Replication

I want to build a highly available PostgreSQL cluster using patroni with etcd. I want to have 3 server (1 master and 2 slaves) in my cluster, so if something goes wrong one of the slaves automatically takes over the master role. Only the master…
Tobias
  • 21
  • 2
2
votes
2 answers

Highly Available PostgreSQL with patroni

I follow this guide to set up an lab for Postgres HA. I follow exactly the guide (change the IP address in my case), after all it all work though on Postgres server 1 But when come to Postgres server 2 patroni.yml setup The guide said on both…
Lê Minh Quân
  • 145
  • 1
  • 7
1
vote
1 answer

Is this Patroni topology safe?

My organization is planning to implement a high-availability PostgreSQL cluster using Patroni and etcd. However, we only have two data center sites available, which makes deploying a standard 3-node etcd cluster across separate failure domains…
1
vote
0 answers

How to prevent PostgreSQL logging Patroni health check connections?

I have PostgreSQL 15.2 from the Percona repo, along with Patroni 3.0.1 as management tool, HAProxy 2.5.11 for proxying and PGBouncer 1.18.0 as server side pool and keepalived 2.1. for the virtual IP. I have 3 nodes, I will use these IPs for the sake…
Gábor Major
  • 163
  • 1
  • 7
1
vote
2 answers

Postgres Hot standby stuck starting waiting for contrrecord despite wal file being present

We are experimenting with patroni Multi Datacenter HA with postgres16 using replication slots. At high level for building the remote cluster from scratch , we are by running base backup, while active is experiencing writes . We use replication slot…
Ganesh
  • 121
  • 3
1
vote
2 answers

what after WAL LSN value of type pg_lsn reach its limit

I am trying to determine the optimal Standby for automated failover based on the highest value of pg_last_wal_receive_lsn() of all slaves. But what if max_wal_size is reached, does pg_lsn values go to 0? Please suggest if there's any better approach…
1
vote
2 answers

PostgreSQL-Patroni-Cluster: Installing oracle_fdw, dependency problem

For Oracle to PostgreSQL migrations we're currently looking into ora2pg. However, the performance using either writes to file or direct read from Oracle and write to PostgreSQL have both been very underwhelming. There's not really good information…
0xCAFEBABE
  • 217
  • 1
  • 10
1
vote
1 answer

Many PG Clusters on more than one machine

I want to run ~10k PostgreSQL clusters. Each cluster will be quite small with moderate traffic. I have will have roughly 100 virtual machines. Each VM should run roughly 100 clusters. Each cluster should run in one container. 100 VMs. Each running…
guettli
  • 1,591
  • 5
  • 25
  • 51
1
vote
1 answer

PostgreSQL process stuck in a "forked new backend" loop when used with Patroni

I have a 3 node Patroni2.1.1 + PGSQL13.4 cluster and one of the nodes is acting weird once it finished the basebackup bootstrap. I have another identical node working fine when put thru the same process. Basically once Patroni tries to connect to…
JulioQc
  • 143
  • 2
  • 9
1
vote
1 answer

Is it good practice to use both PGBouncer and PGPool together?

We have setup a streaming replication on Postgres 13 and it all works fine. Current setup is as follows. We have one Primary Postgres and one Secondary Postgres connected via streaming replication. This replication and cluster management of failover…
Pramod
  • 111
  • 1
  • 3
1
vote
1 answer

Could Barman backup only one database from PostgreSQL?

In my system, I have postgresql 12 and barman v2.13. I have a few backup disk around 1 TB and i have currently added new DB which has 5 TB. Previously my PostgreSQL had no more than 400 GB. i think Barman can not compress backup DB, right? So could…
Melih
  • 284
  • 2
  • 6
  • 19
1
vote
1 answer

Does Postgres CHECKPOINT process affects streaming replication?

Does Postgres CHECKPOINT process affect async streaming replication in any way? If checkpoint_timeout is increased from 5min (default) to 30min, then CHECKPOINT processes will be triggered less often (some other parameters needs to be adjusted as…
elBastarde
  • 285
  • 2
  • 4
  • 10
1
2