Alexander Kukushkin
d9fbbf3ae9
Make pg_hba section more compact
2015-06-02 12:37:26 +02:00
Alexander Kukushkin
f9ce29d49f
rename address to conn_url in a Member obj
...
and introduce new field: api_url
2015-06-02 08:52:34 +02:00
Alexander Kukushkin
bacd05d99e
Determine preferable local address to connect through.
...
If listen contains '*' or 0.0.0.0 - connect via localhost
In all other cases pick the first one.
2015-06-01 17:00:15 +02:00
Alexander Kukushkin
1bcc2b5fa6
Extend postgres?.yml with pg_hba section to give possibility to customize pg_hba.conf
2015-06-01 16:05:35 +02:00
Alexander Kukushkin
adcc7ac256
Try to avoid "double" promotion.
...
Also check presence of trigger_file on master after promotion when
pg_is_in_recovery() = false and if it is there - remove it.
Plus check presence of trigger_file on a new slave (after running
pg_basebackup) and if it is there - also remove it.
2015-06-01 13:48:44 +02:00
Alexander Kukushkin
939254021e
Code cleanup: do not modify os.environ but pass copy of it to subprocess.call
2015-06-01 11:03:06 +02:00
Alexander Kukushkin
b85262637d
Bugfix: do not create replication slot for master
2015-06-01 09:20:24 +02:00
Alexander Kukushkin
9968a66048
helpers/postgresql.py
...
Replace os.system with subprocess.call
2015-05-27 11:08:06 +02:00
Alexander Kukushkin
faf295dcd0
Add initialize key into Cluster
2015-05-24 19:26:35 +02:00
Alexander Kukushkin
ce267d9f1e
query method will retry only in case of communication error
2015-05-24 09:01:23 +02:00
Alexander Kukushkin
f53c369c69
Connect timeout 5 seconds for psycopg2
...
Refactored query and is_healthiest_node methods
query method wont retry more then 3 times if OperationalError raised
is_healthiest_node takes into account that one of the nodes could be
still a master
2015-05-23 20:21:13 +02:00
Alexander Kukushkin
ebb8bce0f6
some simple tests
2015-05-19 12:49:53 +02:00