ossc-db / pg_rman

Backup and restore management tool for PostgreSQL
http://ossc-db.github.io/pg_rman/index.html
Other
476 stars 77 forks source link

Add '--recovery-target-action' option for restore(#182) #187

Closed mikecaat closed 3 years ago

mikecaat commented 3 years ago

Previously, users must execute 'pg_xlog_replay_resume()' or configure 'recovery_target_action' GUC parameter manually if the restored data need archive recovery and users want to promote the server.

Since this limitation annoys users, this patch adds a new option '--recovery-target-action'. If a user specifies this option when to restore, pg_rman configures 'recovery_target_action' GUC parameter automatically. So, the task which the user have to do is only to start the server. After archive recovery is done, the server will promote.