hapostgres / pg_auto_failover

Postgres extension and service for automated failover and high-availability
Other
1.1k stars 115 forks source link

{WIP} Implement on_primary hooks. #958

Open DimCitus opened 1 year ago

DimCitus commented 1 year ago

This allows users of pg_auto_failover to setup their own scripts/actions to complement a failover. The hooks are run in a process that is separate from the main FSM, so as to prevent the system from making progress.

As a result, it's not possible for the hooks to change how things are implemented in pg_auto_failover itself.

The hook system also allows running a user-defined "service", which is a long running process or a deamon that belongs to pg_autoctl process tree.

Fixes #878. Closes #573. Closes #539. Closes #508. Fixes #490. Fixes #440. Fixes #427.

abubakarm94 commented 1 year ago

This feature will be extremely valuable. Any thoughts on when we can expect this?