mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
doc: clarify usage of -F/--force with "standby promote"
Per GitHub #632.
This commit is contained in:
@@ -170,6 +170,42 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>-F</option></term>
|
||||||
|
<term><option>--force</option></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Ignore warnings and continue anyway.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This option is relevant in the following situations if <option>--siblings-follow</option> was specified:
|
||||||
|
<itemizedlist spacing="compact" mark="bullet">
|
||||||
|
<listitem>
|
||||||
|
<simpara>
|
||||||
|
If one or more sibling nodes was not reachable via SSH, the standby will be promoted anyway.
|
||||||
|
</simpara>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<simpara>
|
||||||
|
If the promotion candidate has insufficient free walsenders to accomodate the standbys which will
|
||||||
|
be attached to it, the standby will be promoted anyway.
|
||||||
|
</simpara>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<simpara>
|
||||||
|
If replication slots are in use but the promotion candidate has insufficient free replication slots
|
||||||
|
to accomodate the standbys which will be attached to it, the standby will be promoted anyway.
|
||||||
|
</simpara>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Note that if the <option>-F</option>/<option>--force</option> option is used when any of the above
|
||||||
|
situations is encountered, the onus is on the user to manually resolve any resulting issues.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|||||||
@@ -2390,7 +2390,7 @@ do_standby_promote(void)
|
|||||||
*/
|
*/
|
||||||
if (check_free_wal_senders(available_wal_senders, &sibling_nodes_stats, &dry_run_success) == false)
|
if (check_free_wal_senders(available_wal_senders, &sibling_nodes_stats, &dry_run_success) == false)
|
||||||
{
|
{
|
||||||
if (runtime_options.dry_run == false)
|
if (runtime_options.dry_run == false || runtime_options.force == false)
|
||||||
{
|
{
|
||||||
PQfinish(local_conn);
|
PQfinish(local_conn);
|
||||||
exit(ERR_BAD_CONFIG);
|
exit(ERR_BAD_CONFIG);
|
||||||
@@ -2404,7 +2404,7 @@ do_standby_promote(void)
|
|||||||
*/
|
*/
|
||||||
if (check_free_slots(&local_node_record, &sibling_nodes_stats, &dry_run_success) == false)
|
if (check_free_slots(&local_node_record, &sibling_nodes_stats, &dry_run_success) == false)
|
||||||
{
|
{
|
||||||
if (runtime_options.dry_run == false)
|
if (runtime_options.dry_run == false || runtime_options.force == false)
|
||||||
{
|
{
|
||||||
PQfinish(local_conn);
|
PQfinish(local_conn);
|
||||||
exit(ERR_BAD_CONFIG);
|
exit(ERR_BAD_CONFIG);
|
||||||
@@ -2505,7 +2505,7 @@ _do_standby_promote_internal(PGconn *conn)
|
|||||||
/*
|
/*
|
||||||
* Promote standby to primary.
|
* Promote standby to primary.
|
||||||
*
|
*
|
||||||
* `pg_ctl promote` returns immediately and (prior to 10.0) has no -w
|
* "pg_ctl promote: returns immediately and (prior to 10.0) has no -w
|
||||||
* option so we can't be sure when or if the promotion completes. For now
|
* option so we can't be sure when or if the promotion completes. For now
|
||||||
* we'll poll the server until the default timeout (60 seconds)
|
* we'll poll the server until the default timeout (60 seconds)
|
||||||
*
|
*
|
||||||
@@ -8676,6 +8676,10 @@ do_standby_help(void)
|
|||||||
puts("");
|
puts("");
|
||||||
printf(_(" \"standby promote\" promotes a standby node to primary.\n"));
|
printf(_(" \"standby promote\" promotes a standby node to primary.\n"));
|
||||||
puts("");
|
puts("");
|
||||||
|
printf(_(" --dry-run perform checks etc. but don't actually promote the node\n"));
|
||||||
|
printf(_(" -F, --force ignore warnings and continue anyway\n"));
|
||||||
|
printf(_(" --siblings-follow have other standbys follow new primary\n"));
|
||||||
|
puts("");
|
||||||
|
|
||||||
printf(_("STANDBY FOLLOW\n"));
|
printf(_("STANDBY FOLLOW\n"));
|
||||||
puts("");
|
puts("");
|
||||||
|
|||||||
Reference in New Issue
Block a user