Streaming replicas
Standby servers that can take over and serve read-only reporting.
Streaming replication, automatic failover, connection pooling, and backups you've restored at least once, for Odoo and every application that lives on PostgreSQL.
$ anvexis tldr
Replicate, pool connections, automate failover, rehearse restores.
$ anvexis facts
Standby servers that can take over and serve read-only reporting.
Leader election that promotes a replica when the primary fails.
PgBouncer in front of busy apps so connections don't exhaust memory.
Continuous WAL archiving to restore to any moment, not just last night.
| Setup | Typical recovery point | Typical recovery time |
|---|---|---|
| Nightly dumps only | Up to a day of data | Hours |
| WAL archiving + base backups | Minutes | Depends on database size |
| Streaming replica + failover | Seconds | Under a few minutes |
Actual targets depend on workload and configuration and should be confirmed by failover and restore drills.
Applications can be redeployed in minutes. Data cannot. When the database server fails, everything that depends on it stops, and if the latest backup is a day old, a day of orders, invoices, and stock movements may be gone. For an ERP, the database is effectively the business.
PostgreSQL has excellent built-in tools for resilience: streaming replication keeps standby servers continuously up to date, continuous archiving of the write-ahead log makes point-in-time recovery possible, and mature tooling automates failover. Getting them configured, monitored, and tested together is where most setups fall short.
We design for two numbers you agree with the business: how much data you can afford to lose (RPO) and how long you can afford to be down (RTO). Every technical choice follows from those.
| Setup | Typical recovery | Good for |
|---|---|---|
| Single server + nightly dumps | Restore from dump; data loss up to a day | Development and very small systems |
| Single server + WAL archiving | Point-in-time restore; minutes of data loss | Small production systems |
| Primary + streaming standby | Manual promotion; seconds of data loss | Most business-critical systems |
| Patroni cluster with automatic failover | Automatic promotion in tens of seconds | Systems that must stay up without a person on call |
| Managed cloud PostgreSQL (multi-zone) | Provider-managed failover | Teams that prefer not to run the database themselves |
Actual recovery times depend on data size, network, and configuration, and are measured in your drills.
Streaming replication to one or more standbys, synchronous where zero data loss is required.
Continuous WAL archiving with pgBackRest or WAL-G to off-site storage.
Patroni with a consensus store, plus a connection layer that follows the primary.
PgBouncer to protect the database from connection storms.
Replication lag, connection counts, slow queries, disk growth, and backup freshness.
Vacuum, index, and upgrade procedures that don't need downtime surprises.
Stage 01
Review the current setup, data size, growth, and recovery expectations.
Stage 02
Agree RPO and RTO, and pick the architecture that meets them.
Stage 03
Provision standbys, archiving, failover, and pooling as code.
Stage 04
Run failover and restore drills, and measure the real numbers.
Stage 05
Runbooks, alerts, and a drill schedule your team can follow.
The first pitfall is trusting failover that has never been tested. Automatic failover that has only ever run in a vendor's documentation can surprise you, so we run drills and measure what actually happens.
The second is connection handling. After a failover, applications must find the new primary; without a connection layer that follows it, the database is up but the application still points at the old server.
The third is unbounded growth. Disks fill with logs, bloated tables, or archived WAL that was never cleaned up, and a full disk stops PostgreSQL just as surely as a hardware failure.
| Measure | Why it matters |
|---|---|
| Replication lag | How much data a failover could lose |
| Failover time in drills | The real recovery time, not the theoretical one |
| Backup freshness | Time since the last successful backup and archive |
| Disk growth trend | Warning long before space runs out |
Picture an Odoo database of a few hundred gigabytes on a single server with nightly dumps. A disk failure would lose up to a day of orders and take hours to restore. Adding a streaming standby, continuous WAL archiving to off-site storage, and Patroni-managed failover changes that picture.
In a drill, the primary is shut down on purpose, the standby takes over, and the application reconnects through the pooler. The measured failover time and data loss are recorded and compared with the agreed targets.
Success is a database failure that becomes a short, uneventful incident: the standby takes over, users reconnect, and the measured data loss stays within the agreed target.
PostgreSQL's documentation describes warm and hot standby servers kept current by reading the write-ahead log; if the main server fails, the standby has almost all its data and can quickly become the new primarySource [1]. Its comparison table marks 'primary failure will never lose data' only for WAL shipping with synchronous replicationSource [1], which is the trade-off between safety and write latency you decide with us.
High availability isn't backup. Continuous archiving supports point-in-time recovery to any moment since the base backup was taken, and the docs advise setting up and testing WAL archiving before the first base backup and keeping several backup setsSource [2]. We set up both, and prove recovery with scheduled restores.
Performance tuning
Find what makes Odoo slow with query profiling, PostgreSQL tuning, worker sizing, and caching, then prove the fix with the same workload.
DevOpsBackup & disaster recovery
Backups you have actually restored: offsite copies, encryption, recovery targets, runbooks, and scheduled disaster recovery drills.
InsightsPostgreSQL indexes without tears
A friendly guide to PostgreSQL indexes: B-tree, composite, partial, and GIN indexes, reading EXPLAIN, and when indexes hurt.
Next step
Thirty minutes with an engineer, no slide deck required. You'll leave with a clearer picture, whether or not we work together.