Project

General

Profile

Actions

tickets #159267

open

Configure PostgreSQL / repmgr switchover

Added by crameleon 13 days ago. Updated 13 days ago.

Status:
New
Priority:
Normal
Category:
Core services and virtual infrastructure
Target version:
-
Start date:
2024-04-18
Due date:
% Done:

0%

Estimated time:

Description

Our primary/secondary PostgreSQL pair on mirrordb{1,2}.i.o.o is currently not capable of automatically switching the primary and secondary nodes. Even if the switch is performed manually, PgBouncer on hel{1,2} is still only connecting to mirrordb2.

This blocks us from performing maintenance on the database hosts without outage.

Automatic switchover between mirrordb1 and mirrordb2 must be implemented and hooked into the host= setting on PgBouncer.

There are some ideas:
https://2018.pgday.it/assets/PostgreSQL_High_Availability_using_repmgr_and_pgbouncer.pdf
https://blog.raveland.tech/post/postgresql_repmgr_pgbouncer_en/

Security considerations must be taken into account when granting SSH access between the four machines. All PostgreSQL and repmgr related commands should already be executable through the postgres user, for systemctl some NOPASSWD sudo rules will probably need to be added.

Actions #1

Updated by crameleon 13 days ago

  • Private changed from Yes to No
Actions #2

Updated by crameleon 13 days ago

  • Description updated (diff)
Actions

Also available in: Atom PDF