PostgreSQL failover with repmgr

repmgr adds the failure detection and promotion logic that PostgreSQL leaves to external tools. This page covers how a repmgr failover cluster is designed, configured, fenced and tested before your team relies on it.

On this page

When a repmgr failover design fits your PostgreSQL cluster

A PostgreSQL primary that must survive a server failure without someone promoting a standby by hand needs more than streaming replication. PostgreSQL provides hot standbys, synchronous and asynchronous replication, but it does not detect that a primary has failed and does not notify or promote a standby on its own. Automatic failover therefore depends on an external tool, and repmgr is one of the options that adds that layer to a cluster you already run. The question for your team is whether the operating model repmgr brings fits your staff, your network and your recovery targets.

repmgr adds several pieces around the core server. It clones standbys from the primary, records each node in a metadata schema, and monitors replication health through the repmgr command and the repmgrd daemon. repmgrd can run automatic failover, and repmgr standby switchover handles planned role changes. Its failover logic depends on your fencing scripts, on a witness server if you use one to break ties during network partitions, and on how your clients find the new primary. Compared with other automation approaches, repmgr keeps the cluster on plain PostgreSQL processes with no separate consensus store, which suits some teams and does not suit others. Choose on the basis of your own constraints rather than on a ranking.

Before you commit, confirm the design against the exact repmgr release and the PostgreSQL major version in your environment. Support windows differ by PostgreSQL version, and the PostgreSQL versioning policy lists the current end-of-life dates you should plan around. Check the repmgr compatibility matrix and release notes for your target PostgreSQL version, the behavior of repmgrd under the failure modes you have to survive, and how your team will run and test the cluster after go-live. If you cannot name those answers yet, that gap is the first item for a scoping conversation.

How repmgrd, the witness, fencing and clients fit together

The diagram starts with application clients sending queries through a router or DNS record to the primary in the data network. Standbys receive WAL from the primary over streaming replication. In the management network, repmgrd on each node watches the cluster and records state in the repmgr metadata database. When the primary becomes unreachable, the standbys and the optional witness server reach agreement, a standby is promoted, and the fencing hook isolates the old primary before clients are redirected. Confirm that the fencing script cannot be bypassed and that the witness can reach both networks.

Failure path from primary loss through promotion, fencing and client redirection.

Configuration choices and when each fits

This table compares the main design choices for a repmgr failover setup and the trade-offs each one carries for data loss, split-brain risk, operating load and client reconnection. Read each row against the failure cases you must survive, then confirm exact parameter names and defaults in the repmgr documentation for your version before you commit to a layout.

DecisionOptionTrade-offWhen it fits
Node countTwo data nodes plus a witnessLower server count, but without a third voter a network split can leave the witness unable to tell which side is healthy, so the decision rules need careful testingSmall estates with limited hardware where the team will test partition behavior thoroughly
Node countThree data nodesMore servers and replication to run, but the cluster keeps a clear majority view when one node or one link failsEnvironments where a single node loss must not leave the team guessing which side is authoritative
Replication modeAsynchronous standbyCommits do not wait for the standby, so a failover can lose the most recent committed transactions that had not yet reached itWorkloads that accept a small, measurable data loss window in exchange for lower write latency
Replication modeSynchronous standbyCommits wait for the standby, which protects recent data but adds write latency and can stall writes if the standby is unavailableSystems where losing committed transactions is unacceptable and the team can size the latency cost
FencingFencing script on the old primaryAdds a step that isolates or stops the former primary before promotion, which requires careful scripting and testing against your hypervisor or power controlsClusters where a returning old primary could accept writes and cause split-brain
FencingNo fencingSimpler to run, but a partitioned old primary may keep accepting writes after a new primary is promoted, creating divergent dataOnly where the team has other controls that guarantee the old primary cannot write, and has tested that claim
Failover modeManual failover in repmgrdAn operator decides and runs the promotion, which adds minutes of downtime but keeps a person in the loop for ambiguous failuresTeams with a staffed on-call rota and a tested runbook who prefer human judgment during partitions
Failover modeAutomatic failover in repmgrdPromotion happens without an operator, which shortens outages but depends on correct witness, quorum and fencing behavior to avoid false promotionsTeams that have run failure tests and accept automated decisions under documented conditions
Client redirectionDNS record updateSimple to set up, but clients and resolvers cache answers, so reconnection time depends on TTLs and application connection poolsEnvironments where applications already reconnect on error and the team has measured the reconnection window
Client redirectionVirtual IP or connection routerClients keep one address, and the router or VIP moves to the new primary, but the move must be scripted and tested, and a router needs its own high availabilityApplications with fixed connection strings and a team that can own the VIP or router configuration

How repmgrd decides a primary has failed and who gets promoted

repmgrd is a per-node daemon, so every standby makes its own judgment about the primary, and that design shapes how failover can go wrong. Each node running repmgrd monitors its upstream node (normally the primary) and, on the primary, the downstream standbys it can see. A standby that cannot reach the primary does not immediately promote itself. It first checks whether the primary is reachable from other nodes, and it repeats that check on a polling interval set by settings such as monitor_interval_secs and reconnect_attempts with reconnect_interval. Confirm the exact key names and defaults in the documentation for your repmgr release, because these settings have changed between versions. The timing values are the core trade-off. Short intervals and few reconnect attempts shorten the outage but raise the risk of a false positive, where a brief network blip or a busy primary triggers a promotion that was not needed. Long values do the opposite. Test the values against your own network latency and load before go-live.

The witness server is what stops one network partition from producing two primaries. A witness is a separate node that holds no data and is not a PostgreSQL primary or standby. When a standby suspects the primary is gone, repmgrd asks the witness and the other standbys whether they also lose contact with the primary. A standby is only allowed to promote when a majority of the voting nodes agree the primary is unreachable. If a standby is cut off from the primary and the rest of the cluster, it sees no quorum and stays a standby. Place the witness outside the failure domain of the primary and the standbys, such as a separate rack, zone or site, or a partition may still leave two groups that each believe they hold a majority. Also confirm whether your release supports fencing scripts that the old primary runs before promotion, since a node that was isolated but still accepting writes is the main split-brain risk that voting alone does not remove.

Once a promotion is allowed, repmgrd selects a candidate using rules that favor the standby with the most data. In general terms, it compares the replication position each standby has received and replayed, so the standby that is furthest ahead is preferred, and it uses the configured priority value as a tie-breaker. A standby with priority set to 0 is never promoted, which is useful for a remote or underpowered node. Position-based selection reduces the chance of losing committed transactions, but it does not remove that risk when the primary runs asynchronous replication, so review the replication mode alongside this choice. Ask your repmgr release notes and documentation to confirm how ties, the failover setting and the promotion command are handled, and rehearse a failover in a test cluster to see which standby is chosen and how long the decision takes.

Setup sequence for a repmgr failover cluster

This sequence takes a fresh set of PostgreSQL servers from a confirmed major version to a registered primary, cloned standbys, running repmgrd daemons and a tested fencing hook, with a check at each step so the team knows the cluster is ready before it relies on it.

  1. Confirm the PostgreSQL major version and support end date

    Before installing anything, the platform owner picks the PostgreSQL major version and records its end-of-support date from the versioning policy. Supported versions at the time of the source research were 14 through 18, with 14 ending November 12, 2026, so a cluster built on 14 needs an upgrade plan from day one. Confirm the version against the current policy page, since the schedule is published by the PostgreSQL project and the dates should be rechecked at build time. Done means the version, its end date and the upgrade owner are written into the design record.

  2. Prepare the primary with replication roles and access rules

    On the intended primary, the DBA creates a dedicated replication role, sets the wal_level, max_wal_senders and max_replication_slots parameters, and adds pg_hba.conf entries that allow the replication role to connect from each standby and from the repmgr user. Use TLS and SCRAM-based password authentication where your policy requires it, and confirm that each allowed address is correct, since an overly broad rule is a common source of audit findings. Check the result with a restart, then confirm the server is running and that a test connection from each standby address succeeds with the replication role.

  3. Install repmgr on every node

    The systems team installs the same repmgr package version on the primary, each standby and the witness host, matching the PostgreSQL major version on each node. Mismatched packages across nodes cause confusing errors during cloning and failover, so record the installed versions. Create the repmgr database user and the repmgr database or schema on the primary, and make sure the PostgreSQL binaries are on the path for the service account. Check by running the repmgr version command on every node and comparing the output.

  4. Register the primary in the cluster

    On the primary, the DBA writes a repmgr.conf file that sets the node ID, node name, conninfo, data directory and the service commands the node uses to start, stop and restart PostgreSQL. Then registers the node as primary with the register subcommand. Registration writes metadata into the repmgr schema that every later command depends on. Verify with the cluster show command, which should list one primary with a running status and the correct conninfo. If the node does not appear, fix the configuration before going further.

  5. Clone each standby with repmgr standby clone

    On each standby host, the DBA stops any pre-existing PostgreSQL instance, confirms the data directory is empty, and runs repmgr standby clone against the primary. The command copies the data directory with a base backup and writes the recovery settings for a standby. Cloning is the step most likely to fail on network or authentication rules, so read the output carefully and fix the cause rather than retrying blindly. Done means the standby data directory exists and PostgreSQL starts on it in standby mode, which you can confirm by checking the server state on that host.

  6. Register standbys and check replication

    After starting each standby, the DBA runs repmgr standby register so the standby is recorded in the cluster metadata with its own repmgr.conf. Then checks replication health from the primary using the replication status view and the cluster show command. Each standby should appear as running with an upstream node set to the primary and a small replication lag. If a standby is listed as unregistered or shows a growing lag, resolve that before moving on, because failover candidates are selected from this registered state.

  7. Configure repmgrd and the optional witness on each node

    On every data node, the operator enables the repmgrd service with the failover mode set in repmgr.conf, and sets the promote command, follow command and fencing hook that the daemon runs during failover. If the design uses a witness, register a witness server on its own host, which holds cluster metadata but no data, so that a partitioned network can still reach a majority decision. Confirm the witness appears in cluster show with a witness role. Check each daemon with the service status command and confirm the log shows it monitoring the upstream node.

  8. Add the fencing hook and test before go-live

    Write the fencing script that prevents the old primary from accepting writes after a promotion, then wire it into the failover configuration on every node. Test it on a non-production copy by stopping the primary and confirming that repmgrd promotes the expected standby, that the fencing hook runs, and that the former primary cannot accept writes when it returns. Record the cluster show output and the daemon logs as evidence. The cluster is ready when a planned switchover and an unplanned primary stop both produce the expected result. Confirm the exact behavior your environment needs with the repmgr documentation for your version before relying on it.

Switchover or failover: which procedure to run and when

A controlled switchover is the right procedure when the current primary must go down for patching, a kernel update, hardware work or a minor PostgreSQL release, and the data is healthy. Both nodes are running, and the standby is caught up, so the change can be sequenced rather than improvised. The old primary is demoted to a standby and rejoins the cluster, which leaves you with the same topology you started with.

  • Preconditions: Confirm the standby is streaming and its replication lag is near zero, that no one is running a long batch job or migration, and that the change window and rollback owner are named.
  • Checks before the event: Run the repmgr cluster show command for your version to confirm roles, and check the repmgr.conf and witness status as documented for your release.
  • Execution: Run the switchover from the standby you intend to promote, and follow the documented steps for demoting the old primary and rejoining it. Write the exact commands from the repmgr documentation for your version into the runbook.
  • What the client sees: Applications connected through a router or virtual IP lose connections briefly while sessions are closed, then reconnect. Test how your connection pool and drivers handle this before go-live.
  • Post-event checks: Confirm exactly one primary, both nodes streaming, replication lag back to normal, and that the old primary is registered as a standby. Confirm monitoring shows the new roles.

Treat the switchover as a rehearsed change, not a surprise, and record the outcome in the runbook.

Fencing and split-brain risks to design for

Automatic failover trades one outage for a different risk: two servers believing they are primary, or a promoted standby missing data the old primary acknowledged. The six risks below share a root cause, which is that the cluster's decision to promote and the old primary's ability to accept writes are not tied together. Each card names the cause, the control that closes it and the test that proves the control works.

Former primary accepts writes after rejoining

A primary that was isolated or paused can come back still believing it owns the data directory and accept writes that the new primary never sees. This forks history and forces a manual reconciliation. The control is a fencing hook that stops or isolates the old primary before the standby is promoted, plus rejoining the old node only as a standby through repmgr. Confirm the exact fencing interface and hook behavior in the repmgr documentation for your version. The test is to isolate the primary, trigger promotion, then restore the network and confirm the old node refuses writes or rejoins as a standby.

PostgreSQL failover docs

Standby promoted while primary still lives

On a partitioned network, the standby can lose sight of the primary while clients still reach it. If the standby promotes on that signal alone, two nodes accept writes. The control is a witness server that gives repmgrd an independent vote on whether the primary is truly down, so a single standby's view of the network is not enough to promote. The test is to partition only the standby from the primary while a client keeps writing, then confirm no promotion occurs without witness agreement.

Fencing script fails silently

A fencing script that exits with an error, times out or never runs leaves the old primary reachable while failover proceeds. Teams often discover this only during an incident because nothing alerted on it. The control is to make the fencing step a required, logged and alerted action with an explicit success check, not a fire-and-forget command. Review how repmgr handles a non-zero exit from your hook in its documentation. The test is to force the script to fail on purpose during a rehearsal and confirm the failure is visible to operators and blocks the promotion path you designed.

Witness in the same failure domain

A witness that shares a rack, hypervisor, power feed or network switch with the primary fails at the same moment the primary does. The surviving nodes then cannot form a majority, or the witness reports the wrong state. The control is to place the witness in a separate failure domain from every data node, ideally in a location with its own power and network path. Ask your data center or cloud team to document the shared dependencies for each host. The test is to power off the rack or zone that holds the primary and confirm the witness still gives an accurate answer.

Client cached to the old primary

Even after a correct promotion, applications may keep connections or DNS entries that point to the former primary. Connection pools hold sockets for long periods, and some drivers cache resolved addresses. The control is a routing layer with health checks that send traffic only to the current primary, combined with a connection pool and application settings that reconnect after a failover. Confirm how your router and pool detect a role change. The test is to run a write workload, perform a switchover and measure how long clients take to land on the new primary and whether any write reaches the old one.

Lagging standby promoted with lost transactions

A standby that has not yet replayed the newest WAL can be promoted, and transactions the old primary had already acknowledged are gone. Asynchronous replication makes this possible by design. The control is a deliberate choice of synchronous commit for data that cannot be lost, and a promotion rule that checks replication lag before selecting a candidate. Confirm the synchronous settings and their trade-off in the PostgreSQL high availability documentation. The test is to write a known set of rows, stop the primary before they replicate, promote and check which rows survive against your stated recovery point objective.

High availability docs

Proving failover works before go-live

Before a repmgr cluster carries production traffic, the team should run a fixed set of failure tests against a staging copy of the production topology, with the same number of nodes, the same witness placement, the same repmgr.conf settings and the same fencing script. The test set should cover a planned switchover, a kill of the primary PostgreSQL process, a host power loss on the primary, network isolation of the primary from both standbys and the witness, loss of the witness server, a standby that is deliberately behind on replication, and a rejoin of the old primary after it comes back. Each test should start from a known healthy state and end with the cluster either in a documented, expected state or with a clear finding. Testing a clean failover alone proves little, because most outages involve a partial failure such as a partition or a lagging standby.

For each test, measure four things. First, promotion time: how long passes between the failure and a standby accepting writes, which depends on the repmgrd monitoring interval and the failover timeout settings you configured. Second, client reconnection time: how long the application takes to reach the new primary, measured through whatever routing you use, such as a virtual IP, DNS record or PgBouncer. Third, whether any committed transactions were lost. Check this against your synchronous_commit and synchronous_standby_names settings. Under asynchronous replication, some loss is possible and the team must accept that in writing. Under synchronous replication, loss of an acknowledged commit is a failed result. Fourth, whether the old primary was fenced, meaning it cannot accept writes after promotion. Confirm this by attempting a write to the old primary after each test, not by assuming the fencing script ran.

Record every result in the runbook, including the exact commands, timings, logs consulted and the decision made when a test failed. The runbook should show what the operator sees, which repmgr cluster show output indicates a healthy state, and the steps for rejoining the old primary with repmgr node rejoin. Treat failover testing as a separate planned workstream with its own owner, environment and sign-off, not as a side task of the initial build. Ask your DeployOpen or internal team to confirm in writing which test environment will be used, who approves go-live, and how retests are scheduled after any change to topology, network or configuration.

Security and operational considerations for repmgr clusters

A repmgr cluster is only as safe as the access paths, credentials and change process around it. The cards below cover the controls that sit beside failover: who can replicate, who can administer repmgr, how nodes reach each other, how the cluster is watched, how backups run, and how configuration changes are reviewed.

Dedicated replication role

Create a separate role with the REPLICATION attribute and no other privileges, used only by standbys and pg_basebackup. Restrict it to the standby addresses in pg_hba.conf and require TLS on replication connections, so a leaked application credential cannot start a replica. Confirm which authentication method your team already uses for host entries (SCRAM, certificate or GSSAPI) and whether the same method applies to replication lines.

Authentication methods

Access to the repmgr user and metadata

repmgr keeps cluster state in the repmgr schema of a database it connects to as its own user. That user can change cluster membership, so it should not be a superuser unless your repmgr version and setup require it. Confirm who holds the password, where the credential is stored, and which hosts may authenticate as this user. Audit who can read or write the metadata schema.

SSH access between nodes

repmgr uses SSH for some operations, such as rsync-based cloning and remote commands during switchover. Use a dedicated operating system account per cluster, key-based login only, and a restricted command set or forced command where your policy allows it. Confirm which keys exist on each node, who can rotate them, and whether the witness server needs any SSH trust at all.

Monitoring repmgrd and lag

A failover daemon that has stopped is a silent risk. Alert on repmgrd process health, on the state of each node reported by repmgr cluster show, and on replication lag measured from the primary. Confirm where logs go, how long they are kept, and who receives an alert when a standby disconnects or a witness becomes unreachable. Test each alert with a deliberate fault before go-live.

Backup and point-in-time recovery

Failover moves service to a standby, but it also copies mistakes such as a dropped table or a bad migration. Run base backups and continuous WAL archiving on a separate schedule, and keep the archive off the cluster nodes. Confirm that restores have been tested to a chosen point in time, and that the backup tool can rebuild a node after failover without taking the new primary offline.

Continuous archiving docs

Change control for repmgr.conf and fencing

Treat repmgr.conf and fencing scripts as production code. Store them in version control, review every change, and deploy them the same way on every node so promotion behaves identically. Confirm who may approve changes, how a rollback is performed, and whether a test cluster runs each change through a switchover and a forced failure before it reaches production.

Questions buyers ask before hiring help with repmgr failover

How much effort does a repmgr failover build take, and what drives it?

Effort depends mostly on the number of nodes, whether the cluster spans more than one site, how fencing is designed, how deep the failure testing goes, and how much runbook material the operators need. A two-node primary and standby with a witness on a separate host is a small build. A multi-site cluster with scripted fencing, switchover drills and documented recovery for each failure type is a much larger one. Ask for a written quote that lists each of these drivers separately, so you can see which items you can reduce. No effort figure is given here, because the right number depends on your environment and the scope you agree.

Does a fixed-scope engagement cover both the build and the failure tests?

It can, if the written scope says so. Most DeployOpen engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. For a repmgr build, confirm that the scope names each item: cloning standbys, configuring repmgrd, the witness server, fencing scripts, switchover procedures, the failure tests you want run (for example, stopping the primary process, cutting network paths and filling a disk), the measured results and the runbooks. If a test is not listed, it is not in the price. Ask for the test list to be written out in the scope document.

What does the work need from our side?

Plan for these inputs before the build starts:

  • Servers or virtual machines for the primary, standbys and a witness, with the network paths between them open as the design requires
  • Network access for the team doing the work, plus change windows for any step that restarts a database node
  • A named owner on your side who can make decisions about fencing behavior, recovery priorities and acceptance
  • A staging environment that matches production closely enough to test failover without touching live data

Confirm each item against your own environment. Your security team may need to approve access paths and credentials before work begins.

Can our in-house team build and run repmgr failover without outside help?

A capable team can, but it needs skills in PostgreSQL replication (streaming replication, replication roles, pg_hba.conf), Linux service management, network design for fencing and witness placement, and failure testing. The hardest part is usually not the first setup but the failure cases: split-brain prevention, what happens during a network partition, and whether the old primary is fenced before a new one is promoted. Consider whether your team has run these tests before and whether anyone will own the cluster after go-live. Outside help is most useful for design review, the initial build and the first round of failure tests.

Which PostgreSQL version should we choose, given the support end dates?

Choose a version that is still in its support window for the whole period you plan to run it. According to the PostgreSQL versioning policy, supported versions are 18 (final release November 14, 2030), 17 (to November 8, 2029), 16 (to November 9, 2028), 15 (to November 11, 2027) and 14 (to November 12, 2026). Versions 13 and earlier are no longer supported. Version 18 was first released September 25, 2025. Check the current support status on the PostgreSQL versioning policy page before you finalize the choice, and plan a major upgrade path for the version you pick, because repmgr work is easier to repeat on a version you will keep.

What does ongoing support look like after go-live?

Ongoing support is usually handled through a retainer, which covers upkeep such as minor updates, checks on replication health, periodic failover tests and changes to the cluster as your needs change. Minor PostgreSQL releases arrive at least once every three months, and updating them means replacing executables and restarting, so each update needs a planned window and a failover-aware procedure. Ask for the retainer terms in writing, including what is covered, how requests are handled, and how often failover tests are repeated. Also confirm who on your team keeps the runbooks current.

What should our quote include so we can compare it with other options?

Ask for a written quote tied to the agreed scope. It should list the node count and sites, each deliverable, the failure tests and how results are recorded, the runbooks, the client inputs listed above, and any assumptions about your environment. It should also separate one-time build work from any recurring support. Compare quotes on the same scope. A low quote with fewer failure tests or no witness design is not a like-for-like comparison.

Limits to confirm for your repmgr and PostgreSQL versions

The PostgreSQL major version you choose sets how long the cluster stays supported, and repmgr must support that same version. The cards below cover the version, patching, failover coverage and client routing limits to confirm before you commit to a design.

PostgreSQL 14 support end date

PostgreSQL 14 is supported until November 12, 2026, so a cluster built on it now has a short remaining support window. Later majors have later end dates: 15 until November 11, 2027, 16 until November 9, 2028, 17 until November 8, 2029 and 18 until November 14, 2030. Ask your team which end date your cluster must outlast, since a major upgrade of a repmgr cluster is a separate planned project.

PostgreSQL 14 end of support
Nov 12, 2026
Versioning policy

Unsupported PostgreSQL versions

PostgreSQL 13 and earlier are no longer supported by the PostgreSQL project, so they receive no fixes for security or data-integrity bugs. Treat any existing repmgr cluster on those versions as a migration candidate before you add new failover automation to it. Confirm the exact version of every node, including witness and standby hosts, because a mixed-version cluster can complicate both cloning and switchover.

repmgr support per PostgreSQL major

Support for each PostgreSQL major version is a property of the repmgr release, not of PostgreSQL alone. Read the repmgr release notes for the exact repmgr version you plan to install and confirm it lists your target PostgreSQL major. Do not assume that a newer repmgr release works with an older PostgreSQL major, and record the tested pairing in your runbook so later upgrades start from a known combination.

Rolling restarts for minor releases

PostgreSQL issues minor releases at least once every three months, and minor releases keep the same storage format, so you update by replacing executables and restarting. In a repmgr cluster this means planning a rolling sequence: patch and restart standbys first, perform a switchover, then patch the former primary. Confirm how much write interruption your applications tolerate during the switchover and rehearse the sequence on a non-production copy.

Minor release cadence
3 months
Upgrading docs

Fault types the failover design covers

Automatic failover does not cover every fault. PostgreSQL itself does not detect a failed primary or notify standbys, so repmgrd and your fencing and witness design carry that responsibility. Test which failures your design handles, such as a crashed process, a host power loss, a disk fault or a network partition between nodes, and which it does not. Where a case is not covered, document the manual procedure and who performs it.

Failover docs

Client routing and reconnection target

Failover changes which server accepts writes, so applications must reach the new primary without manual edits. Whether that happens depends on your connection string, any router in front of the cluster and any DNS records that point to a fixed host. Measure how long a client takes to reconnect after a forced failover, and compare that time with the target your service must meet. Confirm that stale connections are dropped and that connection pooling does not keep sending writes to the old primary.

How DeployOpen scopes, builds and supports repmgr failover

DeployOpen plans and implements repmgr failover inside your own infrastructure, whether that is your cloud accounts, data centers or air-gapped network. The work starts with topology and fencing design: how many nodes carry data, where the witness server sits, which network paths can fail independently, and what the fencing script must do to the old primary before a standby is promoted. From there we build the cluster, clone standbys, configure repmgr.conf and repmgrd on every node, and document the decisions so your team can explain them later to an auditor or an incident review.

Each engagement ends with failure and switchover testing, not with a green status page. We run planned switchovers, kill the primary's processes, cut network paths and simulate disk faults, then measure how long clients take to reconnect and whether the fencing held. The output includes runbooks written for operators working under pressure, covering switchover, manual failover, rejoining a former primary and rolling back a failed promotion, along with a handover session with the people who will run the cluster. Confirm with us which PostgreSQL versions and repmgr releases will be in scope, since support windows differ and the current supported major versions are listed in the PostgreSQL versioning policy.

Most engagements are fixed-scope. Scope, deliverables and timelines are agreed in writing before work starts, and a quote follows from that written scope, so ask for the scope document to list topology, number of environments, fencing mechanism, test cases and handover materials. Ongoing support, upgrades and continuous failover testing are available as retainers, which suit teams that need to retest after PostgreSQL minor updates or infrastructure changes. Ask us to state in the quote which items are one-time and which recur.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.