Skip to content

Commit

Permalink
document pgtuning parameters inside the on server config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Giles Westwood committed Mar 28, 2017
1 parent d6c10c2 commit 09c0375
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion postgresql_tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ def tune(data):
const_for_size = CONST_SIZE[memory_arg[-2:]]
total_memory = mem_in_size * const_for_size


### POSTGRESQL CONFIGURATION
config["postgresql"] = postgres_settings(
db_version,
Expand All @@ -313,6 +312,10 @@ def tune(data):

# write configuration file
with open(data["postgresql_file"], 'w') as confile:
# document some key parameters in the on server config file
confile.write("# pgtune db_version = " + str(db_version) + "\n")
confile.write("# pgtune db_type = " + str(db_type) + "\n")
confile.write("# pgtune total_memory = " + str(total_memory / CONST_SIZE['GB']) + 'GB' + "\n")
for k,v in config["postgresql"].items():
confile.writelines("{} = {}\n".format(k,v))

Expand Down

0 comments on commit 09c0375

Please sign in to comment.