patroni.postgresql.rewind module¶
- class patroni.postgresql.rewind.REWIND_STATUS(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
IntEnum
- CHECK = 2¶
- CHECKPOINT = 1¶
- FAILED = 6¶
- INITIAL = 0¶
- NEED = 3¶
- NOT_NEED = 4¶
- SUCCESS = 5¶
- class patroni.postgresql.rewind.Rewind(postgresql: Postgresql)¶
Bases:
object
- property can_rewind: bool¶
check if pg_rewind executable is there and that pg_controldata indicates we have either wal_log_hints or checksums turned on
- ensure_checkpoint_after_promote(wakeup: Callable[[...], Any]) None ¶
After promote issue a CHECKPOINT from a new thread and asynchronously check the result. In case if CHECKPOINT failed, just check that timeline in pg_control was updated.
- read_postmaster_opts() Dict[str, str] ¶
returns the list of option names/values from postgres.opts, Empty dict if read failed or no file