From efccd777b2860b147d708999cc23261db1b28c72 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Mon, 1 Jun 2015 16:47:56 +0200 Subject: [PATCH] rename pid_path to postmaster_pid --- helpers/postgresql.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helpers/postgresql.py b/helpers/postgresql.py index 58038788..06e8b1a1 100644 --- a/helpers/postgresql.py +++ b/helpers/postgresql.py @@ -40,7 +40,7 @@ class Postgresql: self.data_dir = config['data_dir'] self.replication = config['replication'] self.recovery_conf = os.path.join(self.data_dir, 'recovery.conf') - self.pid_path = os.path.join(self.data_dir, 'postmaster.pid') + self.postmaster_pid = os.path.join(self.data_dir, 'postmaster.pid') self.trigger_file = config.get('recovery_conf', {}).get('trigger_file', None) or 'promote' self.trigger_file = os.path.abspath(os.path.join(self.data_dir, self.trigger_file)) self.is_promoted = False @@ -139,9 +139,9 @@ class Postgresql: logger.error('Cannot start PostgreSQL because one is already running.') return False - if os.path.exists(self.pid_path): - os.remove(self.pid_path) - logger.info('Removed %s', self.pid_path) + if os.path.exists(self.postmaster_pid): + os.remove(self.postmaster_pid) + logger.info('Removed %s', self.postmaster_pid) ret = subprocess.call(self._pg_ctl + ['start', '-o', self.server_options()]) == 0 ret and self.load_replication_slots()