Database

DBMail over PostgreSQL + Postfix + SASL on Debian. Part 1. Introduction.

Databases are bad for email. Howbeit, sometimes you really don’t need fast mailing system, but want to use an existing database backup infrastructure. At this article we will setup our own mail server using DBMail, Postfix and SASL. DBMail is an open source mail server which able to use relational database to store all users …

DBMail over PostgreSQL + Postfix + SASL on Debian. Part 1. Introduction. Read More »

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 »