hapostgres / hapostgres/pg_auto_failover
feature request: provide --restore-target-wal to pg_rewind (from PG13)
- Dominant language
- C
- Stars
- 1.4k
- Forks
- 142
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
Hello,
Use case: From Postgres 13 when pg_rewind don't succeed on resynchronizing former primary, just because some WALS are missing, it is now possible to tell pg_rewind to look for them in WAL archives with option --restore-target-wal
pg_auto_failover under the hood uses pg_rewind to synchronize former primary with current one.
When pg_rewind fails it triggers a full backup of current primary (through pg_basebackup )
This requires handle of restore_command in pg_autofailover (new parameter) , not only when resyncing former primary but also when building new replicas.
And, probably, add a new parameter to turn replication slots optionnals (because you mostly don't need it when using log fishing replication e.g. using restore_command).
Today modern storage solutions Azure blob, S3 like formats, provide a remote storage for the backup repository (all without ssh), this is why restore_command parameter has turn a new life.
It is not that easy, but if we can avoid a full backup (particularly through pg_basebackup) it's worth it, particularly on very large databases.
Nowadays, most advanced automatic failover tools handle this use case.
Thank you
Tiago ANASTACIO
Contributor guide
Assessment
This issue has not been assessed yet.