{"slug": "a-database-failover-can-preserve-uptime-and-break-the-answer", "title": "A database failover can preserve uptime and break the answer", "summary": "A PostgreSQL MCP server can remain available during failover and still return the wrong answer, as connection retries against a replica that is behind can combine pre- and post-failover results. The developer recommends giving each workflow a consistency contract and testing failover consistency, not only availability.", "body_md": "A PostgreSQL MCP server can remain available during failover and still return the wrong answer.\n\nThe connection retries against a replica.\n\nThe replica is behind.\n\nA conversation combines a pre-failover result with a post-failover follow-up.\n\nEvery query succeeds, so the final answer looks complete.\n\nBefore production, give each workflow a consistency contract:\n\nThen make source identity, schema version, snapshot marker, observed time, and freshness part of material results.\n\nTest more than promotion:\n\nNever 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.\n\nAvailability is a transport property.\n\nTrustworthy answers need a data contract.\n\nFull 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)", "url": "https://wpnews.pro/news/a-database-failover-can-preserve-uptime-and-break-the-answer", "canonical_source": "https://dev.to/mads_hansen_27b33ebfee4c9/a-database-failover-can-preserve-uptime-and-break-the-answer-5dae", "published_at": "2026-07-28 01:21:53+00:00", "updated_at": "2026-07-28 01:32:08.471223+00:00", "lang": "en", "topics": ["developer-tools", "ai-infrastructure"], "entities": ["PostgreSQL", "MCP"], "alternates": {"html": "https://wpnews.pro/news/a-database-failover-can-preserve-uptime-and-break-the-answer", "markdown": "https://wpnews.pro/news/a-database-failover-can-preserve-uptime-and-break-the-answer.md", "text": "https://wpnews.pro/news/a-database-failover-can-preserve-uptime-and-break-the-answer.txt", "jsonld": "https://wpnews.pro/news/a-database-failover-can-preserve-uptime-and-break-the-answer.jsonld"}}