Add --rsync-only option

Sometimes it's desirable to re-sync a "stale" data directory
on a standby, rather than start from scratch with pg_basebackup().

This re-adds the rsync code from the 2.x series, with some
modifications.

TODO: tablespace support.
This commit is contained in:
Ian Barwick
2015-02-25 14:17:09 +09:00
parent ba254d2f06
commit 32611f5f04
4 changed files with 207 additions and 18 deletions

View File

@@ -79,6 +79,7 @@ typedef struct
bool wait_for_master;
bool ignore_rsync_warn;
bool initdb_no_pwprompt;
bool rsync_only;
char masterport[MAXLEN];
char localport[MAXLEN];
@@ -91,7 +92,7 @@ typedef struct
char min_recovery_apply_delay[MAXLEN];
} t_runtime_options;
#define T_RUNTIME_OPTIONS_INITIALIZER { "", "", "", "", "", "", "", DEFAULT_WAL_KEEP_SEGMENTS, false, false, false, false, false, "", "", 0, "", "" }
#define T_RUNTIME_OPTIONS_INITIALIZER { "", "", "", "", "", "", "", DEFAULT_WAL_KEEP_SEGMENTS, false, false, false, false, false, false, "", "", 0, "", "" }
extern char repmgr_schema[MAXLEN];
#endif