mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
125 lines
3.9 KiB
XML
125 lines
3.9 KiB
XML
<refentry id="repmgr-primary-register">
|
|
<indexterm>
|
|
<primary>repmgr primary register</primary>
|
|
</indexterm>
|
|
|
|
<refmeta>
|
|
<refentrytitle>repmgr primary register</refentrytitle>
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
<refname>repmgr primary register</refname>
|
|
<refpurpose>initialise a repmgr installation and register the primary node</refpurpose>
|
|
</refnamediv>
|
|
|
|
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<para>
|
|
<command>repmgr primary register</command> registers a primary node in a
|
|
streaming replication cluster, and configures it for use with &repmgr;, including
|
|
installing the &repmgr; extension. This command needs to be executed before any
|
|
standby nodes are registered.
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
&repmgr; will attempt to install the &repmgr; extension as part of this command,
|
|
however this will fail if the <literal>repmgr</literal> user is not a superuser.
|
|
</para>
|
|
<para>
|
|
It's possible to install the &repmgr; extension manually before executing
|
|
<command>repmgr primary register</command>; in this case &repmgr; will
|
|
detect the presence of the extension and skip that step.
|
|
</para>
|
|
|
|
</note>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Execution</title>
|
|
<para>
|
|
Execute with the <option>--dry-run</option> option to check what would happen without
|
|
actually registering the primary.
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
If providing the configuration file location with <option>-f/--config-file</option>,
|
|
avoid using a relative path, as &repmgr; stores the configuration file location
|
|
in the repmgr metadata for use when &repmgr; is executed remotely (e.g. during
|
|
<xref linkend="repmgr-standby-switchover"/>). &repmgr; will attempt to convert the
|
|
a relative path into an absolute one, but this may not be the same as the path you
|
|
would explicitly provide (e.g. <filename>./repmgr.conf</filename> might be converted
|
|
to <filename>/path/to/./repmgr.conf</filename>, whereas you'd normally write
|
|
<filename>/path/to/repmgr.conf</filename>).
|
|
</para>
|
|
</note>
|
|
|
|
<para>
|
|
<command>repmgr master register</command> can be used as an alias for
|
|
<command>repmgr primary register</command>.
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>User permission requirements</title>
|
|
<para>
|
|
The <literal>repmgr</literal> user must be a superuser in order for &repmgr;
|
|
to be able to install the <literal>repmgr</literal> extension.
|
|
</para>
|
|
<para>
|
|
If this is not the case, the <literal>repmgr</literal> extension can be installed
|
|
manually before executing <command>repmgr primary register</command>.
|
|
</para>
|
|
<para>
|
|
A future &repmgr; release will enable the provision of a <option>--superuser</option>
|
|
name for the installation of the extension.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1>
|
|
|
|
<title>Options</title>
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
<term><option>--dry-run</option></term>
|
|
<listitem>
|
|
<para>
|
|
Check prerequisites but don't actually register the primary.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term><option>-F</option>, <option>--force</option></term>
|
|
<listitem>
|
|
<para>
|
|
Overwrite an existing node record
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
|
|
<refsect1 id="repmgr-primary-register-events">
|
|
<title>Event notifications</title>
|
|
<para>
|
|
Following <link linkend="event-notifications">event notifications</link> will be generated:
|
|
<itemizedlist spacing="compact" mark="bullet">
|
|
<listitem>
|
|
<simpara><literal>cluster_created</literal></simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara><literal>primary_register</literal></simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|