Make --pgbackrest-restore-stanza working with Patroni

Without patroni this option enable use of pgbackrest to build a replica.

Patroni can provision replicas using pgbackrest as described in https://patroni.readthedocs.io/en/latest/replica_bootstrap.html#building-replicas Implement this by adding a patroni_create_replica_method hook which is currently only implemented when pgbackrest is enabled and --pgbackrest-restore-stanza is set.

As a fallback (e.g. when no backup is available) use default basebackup method.

Change the hook declaration order so patroni hooks are executed before pgbackrest hooks. This is required since pgbackrest initdb() implementation does initialization when --pgbackrest-restore-stanza is set.

Closes #206 (closed)

Merge request reports

Loading