/usr/share/doc/patroni/html/SETTINGS.html is in patroni 1.4.2-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 | <!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>YAML Configuration Settings — Patroni 1.4.2 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="Patroni 1.4.2 documentation" href="index.html"/>
<link rel="next" title="Replica imaging and bootstrap" href="replica_bootstrap.html"/>
<link rel="prev" title="Environment Configuration Settings" href="ENVIRONMENT.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> Patroni
</a>
<div class="version">
1.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="README.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="dynamic_configuration.html">Patroni configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="dynamic_configuration.html#rest-api">REST API</a></li>
<li class="toctree-l1"><a class="reference internal" href="ENVIRONMENT.html">Environment Configuration Settings</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">YAML Configuration Settings</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#global-universal">Global/Universal</a></li>
<li class="toctree-l2"><a class="reference internal" href="#bootstrap-configuration">Bootstrap configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="#consul">Consul</a></li>
<li class="toctree-l2"><a class="reference internal" href="#etcd">Etcd</a></li>
<li class="toctree-l2"><a class="reference internal" href="#exhibitor">Exhibitor</a></li>
<li class="toctree-l2"><a class="reference internal" href="#kubernetes">Kubernetes</a></li>
<li class="toctree-l2"><a class="reference internal" href="#postgresql">PostgreSQL</a></li>
<li class="toctree-l2"><a class="reference internal" href="#rest-api">REST API</a></li>
<li class="toctree-l2"><a class="reference internal" href="#zookeeper">ZooKeeper</a></li>
<li class="toctree-l2"><a class="reference internal" href="#watchdog">Watchdog</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="replica_bootstrap.html">Replica imaging and bootstrap</a></li>
<li class="toctree-l1"><a class="reference internal" href="replication_modes.html">Replication modes</a></li>
<li class="toctree-l1"><a class="reference internal" href="pause.html">Pause/Resume mode for the cluster</a></li>
<li class="toctree-l1"><a class="reference internal" href="kubernetes.html">Using Patroni with Kubernetes</a></li>
<li class="toctree-l1"><a class="reference internal" href="watchdog.html">Watchdog support</a></li>
<li class="toctree-l1"><a class="reference internal" href="releases.html">Release notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="CONTRIBUTING.html">Contributing guidelines</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Patroni</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>YAML Configuration Settings</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/SETTINGS.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="yaml-configuration-settings">
<span id="settings"></span><h1>YAML Configuration Settings<a class="headerlink" href="#yaml-configuration-settings" title="Permalink to this headline">¶</a></h1>
<div class="section" id="global-universal">
<h2>Global/Universal<a class="headerlink" href="#global-universal" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><strong>name</strong>: the name of the host. Must be unique for the cluster.</li>
<li><strong>namespace</strong>: path within the configuration store where Patroni will keep information about the cluster. Default value: “/service”</li>
<li><strong>scope</strong>: cluster name</li>
</ul>
</div>
<div class="section" id="bootstrap-configuration">
<h2>Bootstrap configuration<a class="headerlink" href="#bootstrap-configuration" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><dl class="first docutils">
<dt><strong>dcs</strong>: This section will be written into <cite>/<namespace>/<scope>/config</cite> of a given configuration store after initializing of new cluster. This is the global configuration for the cluster. If you want to change some parameters for all cluster nodes - just do it in DCS (or via Patroni API) and all nodes will apply this configuration.</dt>
<dd><ul class="first last">
<li><strong>loop_wait</strong>: the number of seconds the loop will sleep. Default value: 10</li>
<li><strong>ttl</strong>: the TTL to acquire the leader lock. Think of it as the length of time before initiation of the automatic failover process. Default value: 30</li>
<li><strong>retry_timeout</strong>: timeout for DCS and PostgreSQL operation retries. DCS or network issues shorter than this will not cause Patroni to demote the leader. Default value: 10</li>
<li><strong>maximum_lag_on_failover</strong>: the maximum bytes a follower may lag to be able to participate in leader election.</li>
<li><strong>master_start_timeout</strong>: the amount of time a master is allowed to recover from failures before failover is triggered. Default is 300 seconds. When set to 0 failover is done immediately after a crash is detected if possible. When using asynchronous replication a failover can cause lost transactions. Best worst case failover time for master failure is: loop_wait + master_start_timeout + loop_wait, unless master_start_timeout is zero, in which case it’s just loop_wait. Set the value according to your durability/availability tradeoff.</li>
<li><strong>synchronous_mode</strong>: turns on synchronous replication mode. In this mode a replica will be chosen as synchronous and only the latest leader and synchronous replica are able to participate in leader election. Synchronous mode makes sure that succesfully committed transactions will not be lost at failover, at the cost of losing availability for writes when Patroni cannot ensure transaction durability. See <a class="reference external" href="https://github.com/zalando/patroni/blob/master/docs/replication_modes.rst">replication modes documentation</a> for details.</li>
<li><dl class="first docutils">
<dt><strong>postgresql</strong>:</dt>
<dd><ul class="first last">
<li><strong>use_pg_rewind</strong>:whether or not to use pg_rewind</li>
<li><strong>use_slots</strong>: whether or not to use replication_slots. Must be False for PostgreSQL 9.3. You should comment out max_replication_slots before it becomes ineligible for leader status.</li>
<li><strong>recovery_conf</strong>: additional configuration settings written to recovery.conf when configuring follower.</li>
<li><strong>parameters</strong>: list of configuration settings for Postgres. Many of these are required for replication to work.</li>
</ul>
</dd>
</dl>
</li>
</ul>
</dd>
</dl>
</li>
<li><strong>method</strong>: custom script to use for bootstrpapping this cluster.
See <a class="reference internal" href="replica_bootstrap.html#custom-bootstrap"><span class="std std-ref">custom bootstrap methods documentation</span></a> for details.
When <code class="docutils literal"><span class="pre">initdb</span></code> is specified revert to the default <code class="docutils literal"><span class="pre">initdb</span></code> command. <code class="docutils literal"><span class="pre">initdb</span></code> is also triggered when no <code class="docutils literal"><span class="pre">method</span></code>
parameter is present in the configuration file.</li>
<li><dl class="first docutils">
<dt><strong>initdb</strong>: List options to be passed on to initdb.</dt>
<dd><ul class="first last">
<li><strong>- data-checksums</strong>: Must be enabled when pg_rewind is needed on 9.3.</li>
<li><strong>- encoding: UTF8</strong>: default encoding for new databases.</li>
<li><strong>- locale: UTF8</strong>: default locale for new databases.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><strong>pg_hba</strong>: list of lines that you should add to pg_hba.conf.</dt>
<dd><ul class="first last">
<li><strong>- host all all 0.0.0.0/0 md5</strong>.</li>
<li><strong>- host replication replicator 127.0.0.1/32 md5</strong>: A line like this is required for replication.</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><strong>users</strong>: Some additional users users which needs to be created after initializing new cluster</dt>
<dd><ul class="first last">
<li><dl class="first docutils">
<dt><strong>admin</strong>: the name of user</dt>
<dd><ul class="first last">
<li><strong>password: zalando</strong>:</li>
<li><dl class="first docutils">
<dt><strong>options</strong>: list of options for CREATE USER statement</dt>
<dd><ul class="first last">
<li><strong>- createrole</strong></li>
<li><strong>- createdb</strong></li>
</ul>
</dd>
</dl>
</li>
</ul>
</dd>
</dl>
</li>
</ul>
</dd>
</dl>
</li>
<li><strong>post_bootstrap</strong> or <strong>post_init</strong>: An additional script that will be executed after initializing the cluster. The script receives a connection string URL (with the cluster superuser as a user name). The PGPASSFILE variable is set to the location of pgpass file.</li>
</ul>
</div>
<div class="section" id="consul">
<span id="consul-settings"></span><h2>Consul<a class="headerlink" href="#consul" title="Permalink to this headline">¶</a></h2>
<p>Most of the parameters are optional, but you have to specify one of the <strong>host</strong> or <strong>url</strong></p>
<ul class="simple">
<li><strong>host</strong>: the host:port for the Consul endpoint, in format: http(s)://host:port</li>
<li><strong>url</strong>: url for the Consul endpoint</li>
<li><strong>port</strong>: (optional) Consul port</li>
<li><strong>scheme</strong>: (optional) <strong>http</strong> or <strong>https</strong>, defaults to <strong>http</strong></li>
<li><strong>token</strong>: (optional) ACL token</li>
<li><strong>verify</strong> (optional) whether to verify the SSL certificate for HTTPS requests</li>
<li><strong>cacert</strong>: (optional) The ca certificate. If pressent it will enable validation.</li>
<li><strong>cert</strong>: (optional) file with the client certificate</li>
<li><strong>key</strong>: (optional) file with the client key. Can be empty if the key is part of <strong>cert</strong>.</li>
<li><strong>dc</strong>: (optional) Datacenter to communicate with. By default the datacenter of the host is used.</li>
<li><strong>checks</strong>: (optional) list of Consul health checks used for the session. If not specified Consul will use “serfHealth” in additional to the TTL based check created by Patroni. Additional checks, in particular the “serfHealth”, may cause the leader lock to expire faster than in <cite>ttl</cite> seconds when the leader instance becomes unavailable</li>
</ul>
</div>
<div class="section" id="etcd">
<h2>Etcd<a class="headerlink" href="#etcd" title="Permalink to this headline">¶</a></h2>
<p>Most of the parameters are optional, but you have to specify one of the <strong>host</strong>, <strong>hosts</strong>, <strong>url</strong>, <strong>proxy</strong> or <strong>srv</strong></p>
<ul class="simple">
<li><strong>host</strong>: the host:port for the etcd endpoint.</li>
<li><strong>hosts</strong>: list of etcd endpoint in format host1:port1,host2:port2,etc… Could be a comma separated string or an actual yaml list.</li>
<li><strong>url</strong>: url for the etcd</li>
<li><strong>proxy</strong>: proxy url for the etcd. If you are connecting to the etcd using proxy, use this parameter instead of <strong>url</strong></li>
<li><strong>srv</strong>: Domain to search the SRV record(s) for cluster autodiscovery.</li>
<li><strong>protocol</strong>: (optional) http or https, if not specified http is used. If the <strong>url</strong> or <strong>proxy</strong> is specified - will take protocol from them.</li>
<li><strong>username</strong>: (optional) username for etcd authentication</li>
<li><strong>password</strong>: (optional) password for etcd authentication.</li>
<li><strong>cacert</strong>: (optional) The ca certificate. If pressent it will enable validation.</li>
<li><strong>cert</strong>: (optional) file with the client certificate</li>
<li><strong>key</strong>: (optional) file with the client key. Can be empty if the key is part of <strong>cert</strong>.</li>
</ul>
</div>
<div class="section" id="exhibitor">
<h2>Exhibitor<a class="headerlink" href="#exhibitor" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><strong>hosts</strong>: initial list of Exhibitor (ZooKeeper) nodes in format: ‘host1,host2,etc…’. This list updates automatically whenever the Exhibitor (ZooKeeper) cluster topology changes.</li>
<li><strong>poll_interval</strong>: how often the list of ZooKeeper and Exhibitor nodes should be updated from Exhibitor</li>
<li><strong>port</strong>: Exhibitor port.</li>
</ul>
</div>
<div class="section" id="kubernetes">
<span id="kubernetes-settings"></span><h2>Kubernetes<a class="headerlink" href="#kubernetes" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><strong>namespace</strong>: (optional) Kubernetes namespace where Patroni pod is running. Default value is <cite>default</cite>.</li>
<li><strong>labels</strong>: Labels in format <code class="docutils literal"><span class="pre">{label1:</span> <span class="pre">value1,</span> <span class="pre">label2:</span> <span class="pre">value2}</span></code>. These labels will be used to find existing objects (Pods and either Endpoints or ConfigMaps) associated with the current cluster. Also Patroni will set them on every object (Endpoint or ConfigMap) it creates.</li>
<li><strong>scope_label</strong>: (optional) name of the label containing cluster name. Default value is <cite>cluster-name</cite>.</li>
<li><strong>role_label</strong>: (optional) name of the label containing role (master or replica). Patroni will set this label on the pod it runs in. Default value is <code class="docutils literal"><span class="pre">role</span></code>.</li>
<li><strong>use_endpoints</strong>: (optional) if set to true, Patroni will use Endpoints instead of ConfigMaps to run leader elections and keep cluster state.</li>
<li><strong>pod_ip</strong>: (optional) IP address of the pod Patroni is running in. This value is required when <cite>use_endpoints</cite> is enabled and is used to populate the leader endpoint subsets when the pod’s PostgreSQL is promoted.</li>
<li><strong>ports</strong>: (optional) if the Service object has the name for the port, the same name must appear in the Endpoint object, otherwise service wont work. For example, if your service is defined as <code class="docutils literal"><span class="pre">{Kind:</span> <span class="pre">Service,</span> <span class="pre">spec:</span> <span class="pre">{ports:</span> <span class="pre">[{name:</span> <span class="pre">postgresql,</span> <span class="pre">port:</span> <span class="pre">5432,</span> <span class="pre">targetPort:</span> <span class="pre">5432}]}}</span></code>, then you have to set <code class="docutils literal"><span class="pre">kubernetes.ports:</span> <span class="pre">{[{"name":</span> <span class="pre">"postgresql",</span> <span class="pre">"port":</span> <span class="pre">5432}]}</span></code> and Patroni will use it for updating subsets of the leader Endpoint. This parameter is used only if <cite>kubernetes.use_endpoints</cite> is set.</li>
</ul>
</div>
<div class="section" id="postgresql">
<span id="postgresql-settings"></span><h2>PostgreSQL<a class="headerlink" href="#postgresql" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><dl class="first docutils">
<dt><strong>authentication</strong>:</dt>
<dd><ul class="first last">
<li><dl class="first docutils">
<dt><strong>superuser</strong>:</dt>
<dd><ul class="first last">
<li><strong>username</strong>: name for the superuser, set during initialization (initdb) and later used by Patroni to connect to the postgres.</li>
<li><strong>password</strong>: password for the superuser, set during initialization (initdb).</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><strong>replication</strong>:</dt>
<dd><ul class="first last">
<li><strong>username</strong>: replication username; the user will be created during initialization. Replicas will use this user to access master via streaming replication</li>
<li><strong>password</strong>: replication password; the user will be created during initialization.</li>
</ul>
</dd>
</dl>
</li>
</ul>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><strong>callbacks</strong>: callback scripts to run on certain actions. Patroni will pass the action, role and cluster name. (See scripts/aws.py as an example of how to write them.)</dt>
<dd><ul class="first last">
<li><strong>on_reload</strong>: run this script when configuration reload is triggered.</li>
<li><strong>on_restart</strong>: run this script when the cluster restarts.</li>
<li><strong>on_role_change</strong>: run this script when the cluster is being promoted or demoted.</li>
<li><strong>on_start</strong>: run this script when the cluster starts.</li>
<li><strong>on_stop</strong>: run this script when the cluster stops.</li>
</ul>
</dd>
</dl>
</li>
<li><strong>connect_address</strong>: IP address + port through which Postgres is accessible from other nodes and applications.</li>
<li><strong>create_replica_method</strong>: an ordered list of the create methods for turning a Patroni node into a new replica.
“basebackup” is the default method; other methods are assumed to refer to scripts, each of which is configured as its
own config item. See <a class="reference internal" href="replica_bootstrap.html#custom-replica-creation"><span class="std std-ref">custom replica creation methods documentation</span></a> for further explanation.</li>
<li><strong>data_dir</strong>: The location of the Postgres data directory, either existing or to be initialized by Patroni.</li>
<li><strong>config_dir</strong>: The location of the Postgres configuration directory, defaults to the data directory. Must be writable by Patroni.</li>
<li><strong>bin_dir</strong>: Path to PostgreSQL binaries. (pg_ctl, pg_rewind, pg_basebackup, postgres) The default value is an empty string meaning that PATH environment variable will be used to find the executables.</li>
<li><strong>listen</strong>: IP address + port that Postgres listens to; must be accessible from other nodes in the cluster, if you’re using streaming replication. Multiple comma-separated addresses are permitted, as long as the port component is appended after to the last one with a colon, i.e. <code class="docutils literal"><span class="pre">listen:</span> <span class="pre">127.0.0.1,127.0.0.2:5432</span></code>. Patroni will use the first address from this list to establish local connections to the PostgreSQL node.</li>
<li><strong>use_unix_socket</strong>: specifies that Patroni should prefer to use unix sockets to connect to the cluster. Default value is <code class="docutils literal"><span class="pre">false</span></code>. If <code class="docutils literal"><span class="pre">unix_socket_directories</span></code> is definded, Patroni will use first suitable value from it to connect to the cluster and fallback to tcp if nothing is suitable. If <code class="docutils literal"><span class="pre">unix_socket_directories</span></code> is not specified in <code class="docutils literal"><span class="pre">postgresql.parameters</span></code>, Patroni will assume that default value should be used and omit <code class="docutils literal"><span class="pre">host</span></code> from connection parameters.</li>
<li><strong>pgpass</strong>: path to the <a class="reference external" href="https://www.postgresql.org/docs/current/static/libpq-pgpass.html">.pgpass</a> password file. Patroni creates this file before executing pg_basebackup, the post_init script and under some other circumstances. The location must be writable by Patroni.</li>
<li><strong>recovery_conf</strong>: additional configuration settings written to recovery.conf when configuring follower.</li>
<li><strong>custom_conf</strong> : path to an optional custom <code class="docutils literal"><span class="pre">postgresql.conf</span></code> file, that will be used in place of <code class="docutils literal"><span class="pre">postgresql.base.conf</span></code>. The file must exist on all cluster nodes, be readable by PostgreSQL and will be included from its location on the real <code class="docutils literal"><span class="pre">postgresql.conf</span></code>. Note that Patroni will not monitor this file for changes, nor backup it. However, its settings can still be overriden by Patroni’s own configuration facilities - see <a class="reference external" href="https://github.com/zalando/patroni/blob/master/docs/dynamic_configuration.rst">dynamic configuration</a> for details.</li>
<li><strong>parameters</strong>: list of configuration settings for Postgres. Many of these are required for replication to work.</li>
<li><dl class="first docutils">
<dt><strong>pg_hba</strong>: list of lines that Patroni will use to generate <code class="docutils literal"><span class="pre">pg_hba.conf</span></code>. This parameter has higher priority than <code class="docutils literal"><span class="pre">bootstrap.pg_hba</span></code>. Together with <a class="reference internal" href="dynamic_configuration.html#dynamic-configuration"><span class="std std-ref">dynamic configuration</span></a> it simplifies management of <code class="docutils literal"><span class="pre">pg_hba.conf</span></code>.</dt>
<dd><ul class="first last">
<li><strong>- host all all 0.0.0.0/0 md5</strong>.</li>
<li><strong>- host replication replicator 127.0.0.1/32 md5</strong>: A line like this is required for replication.</li>
</ul>
</dd>
</dl>
</li>
<li><strong>pg_ctl_timeout</strong>: How long should pg_ctl wait when doing <code class="docutils literal"><span class="pre">start</span></code>, <code class="docutils literal"><span class="pre">stop</span></code> or <code class="docutils literal"><span class="pre">restart</span></code>. Default value is 60 seconds.</li>
<li><strong>use_pg_rewind</strong>: try to use pg_rewind on the former leader when it joins cluster as a replica.</li>
<li><strong>remove_data_directory_on_rewind_failure</strong>: If this option is enabled, Patroni will remove postgres data directory and recreate replica. Otherwise it will try to follow the new leader. Default value is <strong>false</strong>.</li>
<li><strong>replica_method</strong> for each create_replica_method other than basebackup, you would add a configuration section of the same name. At a minimum, this should include “command” with a full path to the actual script to be executed. Other configuration parameters will be passed along to the script in the form “parameter=value”.</li>
</ul>
</div>
<div class="section" id="rest-api">
<h2>REST API<a class="headerlink" href="#rest-api" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><strong>connect_address</strong>: IP address and port to access the REST API.</li>
<li><strong>listen</strong>: IP address and port that Patroni will listen to, to provide health-check information for HAProxy.</li>
<li><dl class="first docutils">
<dt><strong>Optional</strong>:</dt>
<dd><ul class="first last">
<li><dl class="first docutils">
<dt><strong>authentication</strong>:</dt>
<dd><ul class="first last">
<li><strong>username</strong>: Basic-auth username to protect unsafe REST API endpoints.</li>
<li><strong>password</strong>: Basic-auth password to protect unsafe REST API endpoints.</li>
</ul>
</dd>
</dl>
</li>
<li><strong>certfile</strong>: Specifies the file with the certificate in the PEM format. If the certfile is not specified or is left empty, the API server will work without SSL.</li>
<li><strong>keyfile</strong>: Specifies the file with the secret key in the PEM format.</li>
</ul>
</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="zookeeper">
<h2>ZooKeeper<a class="headerlink" href="#zookeeper" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><strong>hosts</strong>: list of ZooKeeper cluster members in format: [‘host1:port1’, ‘host2:port2’, ‘etc…’].</li>
</ul>
</div>
<div class="section" id="watchdog">
<h2>Watchdog<a class="headerlink" href="#watchdog" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><strong>mode</strong>: <code class="docutils literal"><span class="pre">off</span></code>, <code class="docutils literal"><span class="pre">automatic</span></code> or <code class="docutils literal"><span class="pre">required</span></code>. When <code class="docutils literal"><span class="pre">off</span></code> watchdog is disabled. When <code class="docutils literal"><span class="pre">automatic</span></code> watchdog will be used if available, but ignored if it is not. When <code class="docutils literal"><span class="pre">required</span></code> the node will not become a leader unless watchdog can be succesfully enabled.</li>
<li><strong>device</strong>: Path to watchdog device. Defaults to <code class="docutils literal"><span class="pre">/dev/watchdog</span></code>.</li>
<li><strong>safety_margin</strong>: Number of seconds of safety margin between watchdog triggering and leader key expiration.</li>
</ul>
</div>
</div>
</div>
<div class="articleComments">
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="replica_bootstrap.html" class="btn btn-neutral float-right" title="Replica imaging and bootstrap" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="ENVIRONMENT.html" class="btn btn-neutral" title="Environment Configuration Settings" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2018 Compose, Zalando SE.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.4.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
|