Comments (4)
Hi Jin
repmgrd does not currently support this kind of functionality. We are currently working on a new version with improved features, including improved metadata which would make it easier to support situations where "STONITH" ("shoot the other node in the head") is required.
Please note that the witness server does not function as a controlling instance for the cluster; it exists to ensure an odd number of nodes are running to provide a "casting vote" when deciding which node to promote in the kind of split brain situation you describe.
Regards
Ian Barwick
from repmgr.
Hi Jin,
I think I have got a working version of repmgrd for your scenario.
Basically, I added a 'gateway' configuration option. If a gateway is set, then the master (only the master) monitors/pings its gateway, if it detects that gateway is down for a configured period of time (the configured period of time is slightly smaller than the configured period of time for the master being down at the moment) - it cannot ping it any more, the master shuts itself down.
This should be pretty much how pgpool2 handles these types of scenarios.
So in your case, after shutting the network interface of the master down, repmgrd should shut the master down after a little while - just before the new master is promoted from the available slaves.
I'll add a pull request in a second, it would be great if you could review it/test it.
Thanks,
Tomas
from repmgr.
PR here #46
from repmgr.
This doesn't seem to be an issue really. repmgr is not where you have to look for STONITH (although it could be done with some scripting and the new events triggering them).
Closing this now
from repmgr.
Related Issues (20)
- Repmgr rpm repo Postgres 16 HOT 1
- Any plan for the new release to support PG16? HOT 2
- repmgr replication with multislaves failover is failing HOT 1
- Repmgr: an older version of the extension is installed but it's not true HOT 1
- **High Priority** repmgr with multi slaves replication solution is not working in k8s environment
- node_rejoin event
- CRITICAL (node "foo" (ID: 2) is not attached to expected upstream node "bar" (ID: 1) repmgr-16
- LOG: could not receive data from client: Connection reset by peer HOT 3
- Slot in the catchup state
- repmgr - failed: fe_sendauth: no password supplied
- Issue encountered while adding script for split-brain prevention HOT 1
- Self-node check method not changed. HOT 1
- node "node_master" (ID: 1) is registered as primary but running as standby HOT 4
- Promote secondary to new master
- master node fails to automatically rejoin the cluster after recovery from failure HOT 1
- repmgrd autofailover not working if PR is down with File system hang HOT 6
- repmgr cluster crosscheck does not work with custom PostgreSQL location
- single HTML page documentation link is broken HOT 1
- repmgr daemon status showing repmgrd as 'not running' HOT 1
- Repmgr cannot perform failover in a cluster that is not in a healthy state.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repmgr.