mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Fix little issues with custom bootstrap (#1891)
1. Set hot_standby=off only when we do PITR 2. Restart postgres after PITR is done to avoid warnings 3. Address invalid config issue https://github.com/zalando/patroni/issues/1870#issuecomment-800088643
This commit is contained in:
@@ -11,6 +11,7 @@ from patroni.async_executor import CriticalTask
|
||||
from patroni.dcs import Cluster, RemoteMember, SyncState
|
||||
from patroni.exceptions import PostgresConnectionException, PatroniException
|
||||
from patroni.postgresql import Postgresql, STATE_REJECT, STATE_NO_RESPONSE
|
||||
from patroni.postgresql.bootstrap import Bootstrap
|
||||
from patroni.postgresql.postmaster import PostmasterProcess
|
||||
from patroni.utils import RetryFailedError
|
||||
from six.moves import builtins
|
||||
@@ -684,6 +685,8 @@ class TestPostgresql(BaseTestPostgresql):
|
||||
self.assertEqual(self.p.get_master_timeline(), 1)
|
||||
|
||||
@patch.object(Postgresql, 'get_postgres_role_from_data_directory', Mock(return_value='replica'))
|
||||
@patch.object(Bootstrap, 'running_custom_bootstrap', PropertyMock(return_value=True))
|
||||
@patch.object(Bootstrap, 'keep_existing_recovery_conf', PropertyMock(return_value=True))
|
||||
def test__build_effective_configuration(self):
|
||||
with patch.object(Postgresql, 'controldata',
|
||||
Mock(return_value={'max_connections setting': '200',
|
||||
|
||||
Reference in New Issue
Block a user