mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Shorten and beautify history log output (#1526)
when Patroni is trying to figure out the necessity of pg_rewind it could write the content history file from the primary into the log. The history file is growing with every failover/switchover and eventually starts taking too many lines in the log, most of them are not so much useful. Instead of showing the raw data, we will show only 3 lines before the current replica timeline and 2 lines after.
This commit is contained in:
@@ -711,7 +711,7 @@ class TestPostgresql(BaseTestPostgresql):
|
||||
self.assertTrue(self.p.fix_cluster_state())
|
||||
|
||||
def test_replica_cached_timeline(self):
|
||||
self.assertEqual(self.p.replica_cached_timeline(1), 2)
|
||||
self.assertEqual(self.p.replica_cached_timeline(2), 3)
|
||||
|
||||
def test_get_master_timeline(self):
|
||||
self.assertEqual(self.p.get_master_timeline(), 1)
|
||||
|
||||
Reference in New Issue
Block a user