Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

During database failover, a standby or replica takes over as the primary database after a failure is detected or an operator initiates a switch. The system may need to recover replicated logs, promote the standby, redirect the database endpoint, and let applications reconnect. It is a recovery process—not necessarily an instant handoff—and its duration and risk of losing recent writes depend on the database service, replication setup, workload, and failure.

What happens during database failover?

In a common high-availability setup, a primary database handles writes while one or more standby servers receive its changes. Failover changes which server has the primary role. Depending on the platform and how current the standby is, the replacement may first need to recover available transaction logs before it can accept writes.

  1. A failure is detected or a switch is initiated. A health monitor, failover manager, cloud service, or operator decides that the current primary is unavailable or should be replaced.
  2. The standby recovers and is promoted. It applies or recovers the replicated changes available to it, then becomes the primary. The precise steps depend on the database and replication configuration.
  3. The old primary is prevented from writing as primary. The system needs to avoid a split-brain situation in which both servers accept writes as if each were primary. PostgreSQL’s failover documentation describes the need to fence the old primary.
  4. The service redirects new connections. A managed service may update a DNS record or stable endpoint to point to the promoted server.
  5. Applications reconnect and resume work. Existing sessions may have failed; applications establish new connections and handle any interrupted operations.

This describes a general pattern, not a universal implementation. In PostgreSQL, the database itself does not provide the software that detects primary failure and notifies a standby; operators must provide external failover tooling. Managed services, such as Azure Database for PostgreSQL Flexible Server, document their own detection, promotion, and endpoint behavior. PostgreSQL 18 failover documentation; Azure Flexible Server high availability.

What happens to database connections?

A role change does not guarantee that existing client sessions survive. Connections to the old primary can be dropped, and an operation in progress may fail. After the replacement is ready and the endpoint points to it, the application generally needs to open a new connection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

A DNS or endpoint change can take time to reach clients that cache an old address. AWS says an RDS Multi-AZ DB instance failover changes its DNS record to point to the standby, and existing connections must be re-established. AWS also notes that Java DNS caching can delay use of the new address and recommends a JVM DNS time-to-live of no more than 60 seconds in this documented context. That is AWS-specific guidance, not a universal database or Java setting. AWS RDS Multi-AZ failover.

Azure Flexible Server likewise documents standby promotion followed by a DNS update; clients reconnect using the same database server name. Azure Flexible Server high availability.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

How applications should recover

  • Use bounded retries with backoff so a brief outage does not cause an uncontrolled surge of connection attempts.
  • Make sure the application can discard broken connections and create new ones through the service’s intended endpoint.
  • Handle uncertain transaction outcomes carefully. If a connection fails around commit time, the application may not know whether the transaction committed; retry only when the operation is safe to repeat or after application-level checks.
  • Do not assume failover automatically replays an application request. The database role switch restores service; request recovery is an application responsibility.

Can failover lose recent data?

Potential data loss depends in part on replication mode and how much change reached the standby before promotion. PostgreSQL documents that synchronous replication waits for participating servers to commit a data-modifying transaction, while asynchronous replication allows a delay between the primary’s commit and propagation. With asynchronous replication, recent committed transactions may be absent from the promoted server, and a lagging replica can serve stale data. Synchronous replication can reduce that exposure, but writes wait for a remote acknowledgment, which adds latency. Guarantees depend on the exact configuration and failure scenario; do not treat “synchronous” alone as proof of zero data loss. PostgreSQL 18 warm standby documentation.

Even synchronous replication does not necessarily mean the standby has already applied every acknowledged log record. Azure Flexible Server says the primary streams WAL logs to the standby and acknowledges a write after the standby has persisted the logs; the standby may still be applying them and remains in recovery until promotion. Azure Flexible Server high availability.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Failover is also not a substitute for backups. A replicated user mistake—such as accidentally dropping a table—can reach the standby too. Azure identifies point-in-time restore as the recovery option for such errors. Azure Flexible Server high availability.

How long does failover take?

There is no universal failover duration. The following are vendor-published figures for specific services, not guarantees or a controlled comparison; actual recovery depends on activity, outstanding transactions, recovery work, and client reconnection.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Service and configuration Published timing Qualification
Amazon RDS Multi-AZ DB instance Typically 60–120 seconds AWS says timing depends on database activity and other conditions; large transactions or lengthy recovery can extend it. AWS guidance accessed October 4, 2026. AWS failover guidance.
Amazon RDS Multi-AZ DB cluster Under 35 seconds AWS says completion depends on activity and occurs when both reader DB instances have applied outstanding transactions from the failed writer. AWS guidance accessed October 4, 2026. AWS cluster failover guidance.
Azure Database for PostgreSQL Flexible Server HA Can take longer than 120 seconds Azure warns duration depends on workload and standby recovery. Azure guidance accessed October 4, 2026. Azure HA guidance.

These figures should not be blended into a general estimate or used to rank providers. Compare the specific deployment, failure scope, transaction load, replica state, and the time clients need to reconnect.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why failover behavior differs by setup

Factor Why it matters
Replication mode Synchronous and asynchronous replication trade off commit latency, replica lag, and exposure of recent writes.
Failure scope and replica location A standby in another availability zone addresses a different failure scope from a regional disaster-recovery replica. Azure warns that its same-zone HA configuration cannot recover from a zone-level failure through that standby; point-in-time restore may be needed.
Standby role A standby may need promotion before it can accept writes. AWS says the standby in its single-standby RDS Multi-AZ DB instance configuration does not serve read traffic; its Multi-AZ DB cluster configuration has reader instances.
Detection and orchestration Self-managed PostgreSQL requires external software or an operator process to detect primary failure and initiate notification and promotion.
Endpoint and client behavior Changing the primary does not preserve client sockets, and cached DNS information may delay connections to the replacement.
Restoring redundancy The promoted server may be available before a replacement standby is rebuilt. PostgreSQL documents that a standby becomes primary after promotion and a standby must be recreated to return to the normal arrangement.

AWS documents synchronous replication and potentially higher write and commit latency for its single-standby Multi-AZ DB instance setup. Azure’s zone-redundant and same-zone options also differ in replica placement and failure coverage; these are service-specific behaviors, not rules that apply to every cloud database. AWS Multi-AZ deployments; Azure Flexible Server high availability; PostgreSQL 18 failover documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

How to prepare for failover

  • Identify the exact database service, engine, high-availability topology, and failure scope before setting recovery expectations.
  • Confirm how failure detection, promotion, fencing of the old primary, and endpoint changes are handled.
  • Understand whether replication is synchronous or asynchronous and what the configured system guarantees for acknowledged writes.
  • Test application reconnection and safe handling of interrupted or ambiguous transactions, not just whether the database changes roles.
  • Monitor provider failover events and test recovery in the actual environment. AWS recommends testing failover duration and application behavior; it also notes that inadequate I/O can lengthen recovery, smaller transactions can reduce recovery work, and latency may rise while a new standby catches up. These are AWS recommendations, not independent benchmark results. AWS RDS failover testing guidance.
  • For self-managed PostgreSQL, maintain written administration procedures and exercise role switching regularly. Plan to fence the former primary and recreate a standby after promotion. PostgreSQL 18 failover documentation.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.