summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMarko Kreen2011-11-14 10:50:01 +0000
committerMarko Kreen2011-11-14 10:50:01 +0000
commit236972c7dfadcf7ebc654b0585dfd5df94e82e16 (patch)
tree52dcece0a0c5a8a787b772093a7e0fdae014abf6 /python
parentb8ee8d708a54abd9ce7f707f3e027589642f4731 (diff)
parentbf55a2492267d6872bd66ac2b25a2e93b9e1d5b0 (diff)
Merge remote-tracking branch 'intgit/master'
Diffstat (limited to 'python')
-rw-r--r--python/skytools/config.py3
-rwxr-xr-xpython/walmgr.py6
2 files changed, 9 insertions, 0 deletions
diff --git a/python/skytools/config.py b/python/skytools/config.py
index c276a5d1..9f19306f 100644
--- a/python/skytools/config.py
+++ b/python/skytools/config.py
@@ -205,3 +205,6 @@ class Config(object):
def items(self):
"""Returns list of (name, value) for each option in main section."""
return self.cf.items(self.main_section)
+
+ # define some aliases (short-cuts / backward compatibility cruft)
+ getbool = getboolean
diff --git a/python/walmgr.py b/python/walmgr.py
index 7afc3c73..d4796401 100755
--- a/python/walmgr.py
+++ b/python/walmgr.py
@@ -1358,6 +1358,12 @@ STOP TIME: %(stop_time)s
# copy data
self.exec_rsync([ srcpath, dst_loc ], True)
+ # sync the buffers to disk - this is should reduce the chance
+ # of WAL file corruption in case the slave crashes.
+ slave = self.cf.get("slave")
+ cmdline = ["ssh", "-nT", slave, "sync" ]
+ self.exec_cmd(cmdline)
+
self.log.debug("%s: done", srcname)
end_time = time.time()
self.stat_add('count', 1)