# A database failover can preserve uptime and break the answer

> Source: <https://dev.to/mads_hansen_27b33ebfee4c9/a-database-failover-can-preserve-uptime-and-break-the-answer-5dae>
> Published: 2026-07-28 01:21:53+00:00

A PostgreSQL MCP server can remain available during failover and still return the wrong answer.

The connection retries against a replica.

The replica is behind.

A conversation combines a pre-failover result with a post-failover follow-up.

Every query succeeds, so the final answer looks complete.

Before production, give each workflow a consistency contract:

Then make source identity, schema version, snapshot marker, observed time, and freshness part of material results.

Test more than promotion:

Never concatenate partial rows from the old primary with rows from the new one. If the answer cannot prove one consistency boundary, discard the partial result and return a structured retryable failure.

Availability is a transport property.

Trustworthy answers need a data contract.

Full test guide: [MCP server for Postgres: test failover consistency, not only availability](https://conexor.io/blog/mcp-server-postgres-failover-consistency-test?utm_source=devto&utm_medium=article&utm_campaign=content)
