February 2020
Intermediate to advanced
734 pages
38h 13m
English
Relying on the tail command is an old standby method that's frequently useful for watching logs. Unfortunately, we also need to know which server won the leadership race to know which logs to observe. We could use the list parameter for patronictl, yet the takeover process relies on several timeouts. The authors of Patroni considered this and added a -w flag to watch the command by running it upon a configurable interval.
This means we could observe the failover and takeover as it happened with a command like this:
patronictl -d pgha1:2379 list -w 5 stampede
Of course, this isn't really a novel feature. It's extremely likely that most Linux systems have the watch command installed, and it fills the same role. We could get ...
Read now
Unlock full access