1<refentry id="repmgr-daemon-start"> 2 <indexterm> 3 <primary>repmgr daemon start</primary> 4 </indexterm> 5 6 <indexterm> 7 <primary>repmgrd</primary> 8 <secondary>starting</secondary> 9 </indexterm> 10 11 <refmeta> 12 <refentrytitle>repmgr daemon start</refentrytitle> 13 </refmeta> 14 15 <refnamediv> 16 <refname>repmgr daemon start</refname> 17 <refpurpose>Start the &repmgrd; daemon on the local node</refpurpose> 18 </refnamediv> 19 20 <refsect1> 21 <title>Description</title> 22 <para> 23 This command starts the &repmgrd; service on the 24 local node. 25 </para> 26 <para> 27 By default, &repmgr; will wait for up to 15 seconds to confirm that &repmgrd; 28 started. This behaviour can be overridden by specifying a diffent value using the <option>--wait</option> 29 option, or disabled altogether with the <option>--no-wait</option> option. 30 </para> 31 32 <important> 33 <para> 34 The <filename>repmgr.conf</filename> parameter <varname>repmgrd_service_start_command</varname> 35 must be set for <command>repmgr daemon start</command> to work; see section 36 <xref linkend="repmgr-daemon-start-configuration"/> for details. 37 </para> 38 </important> 39 </refsect1> 40 41 42 43 <refsect1> 44 45 <title>Options</title> 46 47 <variablelist> 48 49 <varlistentry> 50 <term><option>--dry-run</option></term> 51 <listitem> 52 <para> 53 Check prerequisites but don't actually attempt to start &repmgrd;. 54 </para> 55 <para> 56 This action will output the command which would be executed. 57 </para> 58 </listitem> 59 </varlistentry> 60 61 <varlistentry> 62 <term><option>-w</option></term> 63 <term><option>--wait</option></term> 64 <listitem> 65 <para> 66 Wait for the specified number of seconds to confirm that &repmgrd; 67 started successfully. 68 </para> 69 <para> 70 Note that providing <option>--wait=0</option> is the equivalent of <option>--no-wait</option>. 71 </para> 72 73 </listitem> 74 </varlistentry> 75 76 <varlistentry> 77 <term><option>--no-wait</option></term> 78 <listitem> 79 <para> 80 Don't wait to confirm that &repmgrd; 81 started successfully. 82 </para> 83 <para> 84 This is equivalent to providing <option>--wait=0</option>. 85 </para> 86 </listitem> 87 </varlistentry> 88 89 </variablelist> 90 </refsect1> 91 92 <refsect1 id="repmgr-daemon-start-configuration" xreflabel="repmgr daemon start configuration"> 93 <title>Configuration file settings</title> 94 <para> 95 The following parameter in <filename>repmgr.conf</filename> is relevant 96 to <command>repmgr daemon start</command>: 97 </para> 98 99 <variablelist> 100 101 <varlistentry> 102 103 <term><option>repmgrd_service_start_command</option></term> 104 <listitem> 105 <indexterm> 106 <primary>repmgrd_service_start_command</primary> 107 <secondary>with "repmgr daemon start"</secondary> 108 </indexterm> 109 110 <para> 111 <command>repmgr daemon start</command> will execute the command defined by the 112 <varname>repmgrd_service_start_command</varname> parameter in <filename>repmgr.conf</filename>. 113 This must be set to a shell command which will start &repmgrd;; 114 if &repmgr; was installed from a package, this will be the service command defined by the 115 package. For more details see <link linkend="appendix-packages">Appendix: &repmgr; package details</link>. 116 </para> 117 <important> 118 <para> 119 If &repmgr; was installed from a system package, and you do not configure 120 <varname>repmgrd_service_start_command</varname> to an appropriate service command, this may 121 result in the system becoming confused about the state of the &repmgrd; 122 service; this is particularly the case with <literal>systemd</literal>. 123 </para> 124 </important> 125 </listitem> 126 </varlistentry> 127 </variablelist> 128 129 </refsect1> 130 131 132 <refsect1> 133 <title>Exit codes</title> 134 <para> 135 One of the following exit codes will be emitted by <command>repmgr daemon start</command>: 136 </para> 137 <variablelist> 138 139 <varlistentry> 140 <term><option>SUCCESS (0)</option></term> 141 <listitem> 142 <para> 143 The &repmgrd; start command (defined in 144 <varname>repmgrd_service_start_command</varname>) was successfully executed. 145 </para> 146 <para> 147 If the <option>--wait</option> option was provided, &repmgr; will confirm that 148 &repmgrd; has actually started up. 149 </para> 150 </listitem> 151 </varlistentry> 152 153 <varlistentry> 154 <term><option>ERR_BAD_CONFIG (1)</option></term> 155 <listitem> 156 <para> 157 <varname>repmgrd_service_start_command</varname> is not defined in 158 <filename>repmgr.conf</filename>. 159 </para> 160 </listitem> 161 </varlistentry> 162 163 164 <varlistentry> 165 <term><option>ERR_DB_CONN (6)</option></term> 166 <listitem> 167 <para> 168 &repmgr; was unable to connect to the local PostgreSQL node. 169 </para> 170 <para> 171 PostgreSQL must be running before &repmgrd; 172 can be started. Additionally, unless the <option>--no-wait</option> option was 173 provided, &repmgr; needs to be able to connect to the local PostgreSQL node 174 to determine the state of &repmgrd;. 175 </para> 176 </listitem> 177 </varlistentry> 178 179 180 <varlistentry> 181 <term><option>ERR_REPMGRD_SERVICE (27)</option></term> 182 <listitem> 183 <para> 184 The &repmgrd; start command (defined in 185 <varname>repmgrd_service_start_command</varname>) was not successfully executed. 186 </para> 187 <para> 188 This can also mean that &repmgr; was unable to confirm whether &repmgrd; 189 successfully started (unless the <option>--no-wait</option> option was provided). 190 </para> 191 </listitem> 192 </varlistentry> 193 194 </variablelist> 195 </refsect1> 196 197 <refsect1> 198 <title>See also</title> 199 <para> 200 <xref linkend="repmgr-daemon-stop"/>, 201 <xref linkend="repmgrd-daemon"/>, 202 <xref linkend="repmgr-service-status"/>, 203 <xref linkend="repmgr-service-pause"/>, 204 <xref linkend="repmgr-service-unpause"/> 205 </para> 206 </refsect1> 207 208</refentry> 209