PostgreSQL

Fault tolerant PostgreSQL cluster. Part 5. Testing. Ansible. Final thoughts.

Part 1. Introduction.Part 2. Replication. Repmgr.Part 3. Auto-failover. Repmgr daemons.Part 4. HA. Backup. Repmgr daemons. Barman.Part 5. Testing. Ansible. Final thoughts. Manual switchover On backup server run. su – postgres repmgr standby switchover -f /etc/repmgrd_db2.conf –log-to-file Auto-failover db2 is a new master now. Gracefully shutdown db2 server. shutdown -h now Wait for db1 server promotion. …

Fault tolerant PostgreSQL cluster. Part 5. Testing. Ansible. Final thoughts. Read More »

Fault tolerant PostgreSQL cluster. Part 4. High availability. Backup. Repmgr daemon. Barman.

Part 1. Introduction.Part 2. Replication. Repmgr.Part 3. Auto-failover. Repmgr daemons.Part 4. HA. Backup. Repmgr daemons. Barman.Part 5. Testing. Ansible. Final thoughts. At this part, we will: make PostgreSQL high available using repmgr daemons use barman for streaming backup combine HA feature and barman to store master and standby backups in the same barman place and …

Fault tolerant PostgreSQL cluster. Part 4. High availability. Backup. Repmgr daemon. Barman. Read More »

Fault tolerant PostgreSQL cluster. Part 3. Auto-failover. Repmgr daemon.

Part 1. Introduction.Part 2. Replication. Repmgr.Part 3. Auto-failover. Repmgr daemons.Part 4. HA. Backup. Repmgr daemons. Barman.Part 5. Testing. Ansible. Final thoughts. At this part, we will create two repmgr daemons on backup server and setup auto-failover. Why not place daemons on db servers? Because in this case we don’t have voting majority, which dispose to …

Fault tolerant PostgreSQL cluster. Part 3. Auto-failover. Repmgr daemon. Read More »

Fault tolerant PostgreSQL cluster. Part 2. Replication. Repmgr.

Part 1. Introduction.Part 2. Replication. Repmgr.Part 3. Auto-failover. Repmgr daemons.Part 4. HA. Backup. Repmgr daemons. Barman.Part 5. Testing. Ansible. Final thoughts. At this part, we will setup master (db1) and standby (db2) replication servers using repmgr. First, create repmgr user and database on db1 server. su – postgres createuser -s repmgr psql -c “alter user …

Fault tolerant PostgreSQL cluster. Part 2. Replication. Repmgr. Read More »

Fault tolerant PostgreSQL cluster with automatic failover using Repmgr and Barman. Part 1. Introduction.

Right off the bat, this is what you’ll get in the end: Synhronous standby server using repmgr Repmgr daemons running not on db servers No need of witness server with own PostgreSQL instance Split-brain tolerant auto-failover High available configuration without additional utils, such as HAProxy Backup server using barman Asynchronous WAL streaming Became synchronous, if …

Fault tolerant PostgreSQL cluster with automatic failover using Repmgr and Barman. Part 1. Introduction. Read More »