Skip to content

Commit

Permalink
Tune restart - works best with fast stop, followed by start
Browse files Browse the repository at this point in the history
  • Loading branch information
miketonks committed Aug 5, 2015
1 parent 16a8850 commit f9729d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion helpers/postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ def restart(self, master=False):
else:
logger.info("Restarting PostgreSQL in Slave mode")

return os.system("pg_ctl restart -w -D %s -o \"%s\" -m fast" % (self.data_dir, self.server_options())) == 0
# return os.system("pg_ctl restart -m fast -w -D %s -o \"%s\"" % (self.data_dir, self.server_options())) == 0
# return os.system("pg_ctl restart -w -D %s -o \"%s\" -m fast" % (self.data_dir, self.server_options())) == 0
self.stop() # fast shutdown
self.start(master)

def server_options(self):
options = "-c listen_addresses=%s -c port=%s" % (self.host, self.server_port())
Expand Down

0 comments on commit f9729d2

Please sign in to comment.