mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Update optime/leader with checkpoint location after clean shut down (#1527)
Potentially this information could be used in order to make sure that there is no data loss on switchover.
This commit is contained in:
@@ -338,6 +338,11 @@ class TestPostgresql(BaseTestPostgresql):
|
||||
with patch.object(Postgresql, '_query', Mock(side_effect=RetryFailedError(''))):
|
||||
self.assertRaises(PostgresConnectionException, self.p.is_leader)
|
||||
|
||||
@patch.object(Postgresql, 'controldata',
|
||||
Mock(return_value={'Database cluster state': 'shut down', 'Latest checkpoint location': 'X/678'}))
|
||||
def test_latest_checkpoint_location(self):
|
||||
self.assertIsNone(self.p.latest_checkpoint_location())
|
||||
|
||||
def test_reload(self):
|
||||
self.assertTrue(self.p.reload())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user