patroni.postgresql.rewind module¶
-
class
patroni.postgresql.rewind.
REWIND_STATUS
(value)¶ Bases:
enum.IntEnum
An enumeration.
-
CHECK
= 2¶
-
CHECKPOINT
= 1¶
-
FAILED
= 6¶
-
INITIAL
= 0¶
-
NEED
= 3¶
-
NOT_NEED
= 4¶
-
SUCCESS
= 5¶
-
-
class
patroni.postgresql.rewind.
Rewind
(postgresql: patroni.postgresql.Postgresql)¶ Bases:
object
-
property
can_rewind
¶ check if pg_rewind executable is there and that pg_controldata indicates we have either wal_log_hints or checksums turned on
-
property
can_rewind_or_reinitialize_allowed
¶
-
property
enabled
¶
-
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.
-
execute
(leader: Union[patroni.dcs.Leader, patroni.dcs.RemoteMember]) → Optional[bool]¶
-
property
executed
¶
-
property
failed
¶
-
property
is_needed
¶
-
read_postmaster_opts
() → Dict[str, str]¶ returns the list of option names/values from postgres.opts, Empty dict if read failed or no file
-
rewind_or_reinitialize_needed_and_possible
(leader: Optional[Union[patroni.dcs.Leader, patroni.dcs.RemoteMember]]) → bool¶
-
property
should_remove_data_directory_on_diverged_timelines
¶
-
property