mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
standby clone: emit pg_basebackup command in --dry-run mode
This commit is contained in:
@@ -670,6 +670,15 @@ do_standby_clone(void)
|
|||||||
log_hint(_("consider using the -c/--fast-checkpoint option"));
|
log_hint(_("consider using the -c/--fast-checkpoint option"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mode == pg_basebackup)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* In --dry-run mode, this will just output the pg_basebackup command which
|
||||||
|
* would be executed.
|
||||||
|
*/
|
||||||
|
run_basebackup(&local_node_record);
|
||||||
|
}
|
||||||
|
|
||||||
PQfinish(source_conn);
|
PQfinish(source_conn);
|
||||||
|
|
||||||
log_info(_("all prerequisites for \"standby clone\" are met"));
|
log_info(_("all prerequisites for \"standby clone\" are met"));
|
||||||
@@ -6776,6 +6785,13 @@ run_basebackup(t_node_info *node_record)
|
|||||||
|
|
||||||
termPQExpBuffer(¶ms);
|
termPQExpBuffer(¶ms);
|
||||||
|
|
||||||
|
if (runtime_options.dry_run == true)
|
||||||
|
{
|
||||||
|
log_info(_("would execute:\n %s"), script.data);
|
||||||
|
termPQExpBuffer(&script);
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
log_info(_("executing:\n %s"), script.data);
|
log_info(_("executing:\n %s"), script.data);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user