diff options
author | Martin Pihlak | 2009-12-29 11:32:15 +0000 |
---|---|---|
committer | Martin Pihlak | 2009-12-29 11:32:15 +0000 |
commit | 54e876a6dc12f83ae0861319c7d4ee838e46a9c8 (patch) | |
tree | e4db6289f14b164a9860de1b870333b276de5d59 /python/walmgr.py | |
parent | 1ff746f96d97f581a0bf6e27887cb086476223aa (diff) |
Redundant pg_auth file synch removed. By Mark Kirkwood.
Diffstat (limited to 'python/walmgr.py')
-rwxr-xr-x | python/walmgr.py | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/python/walmgr.py b/python/walmgr.py index 6119858f..4aa7a119 100755 --- a/python/walmgr.py +++ b/python/walmgr.py @@ -472,8 +472,6 @@ class WalMgr(skytools.DBScript): except: self.log.fatal("Cannot write to %s" % fn) - def authfile_name(self): - return os.path.join(self.cf.get("master_data"), os.path.join("global", "pg_auth")) def master_stop(self): """Deconfigure archiving, attempt to stop syncdaemon""" @@ -899,7 +897,7 @@ STOP TIME: %(stop_time)s dst_loc += "/" # copy data - self.exec_rsync([ srcpath, self.authfile_name(), dst_loc ], True) + self.exec_rsync([ srcpath, dst_loc ], True) self.log.debug("%s: done", srcname) end_time = time.time() @@ -1013,16 +1011,8 @@ STOP TIME: %(stop_time)s data_dir = self.cf.get("master_data") xlog_dir = os.path.join(data_dir, "pg_xlog") - auth_loc = os.path.join(self.cf.get("completed_wals"), "") dst_loc = os.path.join(self.cf.get("partial_wals"), "") - # sync the auth file - if not daemon_mode: - # avoid the extra rsync in daemon mode - the file is fairly static, so we - # don't need to sync it every N seconds. - if self.exec_rsync([self.authfile_name(), auth_loc]) != 0: - self.log.warning('Cannot sync auth file') - db = None if use_xlog_functions: try: @@ -1447,8 +1437,6 @@ restore_command = '%s %s %s' srcdir = self.cf.get("completed_wals") datadir = self.cf.get("slave_data") stopfile = os.path.join(srcdir, "STOP") - src_authfile = os.path.join(srcdir, "pg_auth") - dst_authfile = os.path.join(datadir, os.path.join("global", "pg_auth")) if self.not_really: self.log.info("Writing STOP file: %s" % stopfile) @@ -1456,13 +1444,6 @@ restore_command = '%s %s %s' open(stopfile, "w").write("1") self.log.info("Stopping recovery mode") - if os.path.isfile(src_authfile): - self.log.debug("Using pg_auth file from master.") - try: - os.rename(dst_authfile, "%s.old" % dst_authfile) - self.exec_cmd(["cp", src_authfile, dst_authfile]) - except Exception, e: - self.log.warning("Unable to restore pg_auth file: %s" % e) def slave_pause(self, waitcomplete=0): """Pause the WAL apply, wait until last file applied if needed""" |