Middle
Оцени время downtime при switchover мастера в PostgreSQL.
sobes.tech AI
Answer from AI
Downtime during a master switchover in PostgreSQL depends on several factors:
- The method of implementing the switchover (manual or automatic through tools like Patroni, repmgr).
- The volume of data and replication speed.
- System load and network delays.
Typically, a switchover is a controlled role switch between master and replica without data loss, so downtime is minimal and can range from a few hundred milliseconds to several seconds.
For example, with Patroni:
- The switchover process takes about 1-3 seconds.
- Clients may experience a brief connection loss but reconnect to the new master after the switch.
If the switchover is performed manually, downtime may be longer due to the need to stop and start services.
Overall, with proper configuration and the use of modern tools, downtime during a PostgreSQL switchover is minimal and suitable for systems with high availability requirements.