-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minor tweaks #24
minor tweaks #24
Conversation
radek-senfeld
commented
Sep 4, 2015
- trottelfest checking ttl > 2 * loop_wait
- user configurable .pgpass filepath
* user configurable .pgpass file
@@ -18,6 +18,8 @@ | |||
class Patroni: | |||
|
|||
def __init__(self, config): | |||
assert config["etcd"]["ttl"] > 2 * config["loop_wait"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And what about other configuration stores?
Currently we already support ZooKeeper and working on Consul support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Fixed for etcd, no exp with ZK nor Consul..
@@ -88,6 +91,11 @@ def run(self): | |||
try: | |||
if self.ha.state_handler.is_leader(): | |||
self.ha.cluster and self.ha.state_handler.create_replication_slots(self.ha.cluster) | |||
|
|||
# SkyDNS2 support: publish leader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd like to keep the code as generic as possible. This could be implemented by the ACTION_ON_ROLE_CHANGE callback (to call a script for example). This does however require some more documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my thinking as well but for our use case callback cannot be used because it's being called just once - on a role change. We need periodic record refresh to keep record's TTL short = faster response when anything goes wrong.
Sorry for that, it wasn't meant to be part of my PR. Still being a git noob, I don't know how to divide future commits from PR I've already made.. :-(
* fixed log level in scripts/restore.py
Synchronous replication is now supported and it's also possible to configure custom location for pgpass. |