|
5 | 5 |
|
6 | 6 | <meta charset="utf-8"> |
7 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> |
8 | | -<meta name="generator" content="Hugo 0.40.3" /> |
| 8 | +<meta name="generator" content="Hugo 0.40" /> |
9 | 9 |
|
10 | 10 | <title>Getting Started :: Crunchy Data PostgreSQL Operator Documentation</title> |
11 | 11 | <link rel="shortcut icon" href="https://crunchydata.github.io/postgres-operator/favicon.ico" type="image/x-icon" /> |
|
91 | 91 | Helm Chart |
92 | 92 | </a> |
93 | 93 | </div> |
94 | | - </li> |
95 | | - <li data-nav-id="/installation/upgrading-the-operator/" class="dd-item"> |
96 | | - <div> |
97 | | - <a href="https://crunchydata.github.io/postgres-operator/installation/upgrading-the-operator/"> |
98 | | - Upgrading the Operator |
99 | | - </a> |
100 | | - </div> |
101 | 94 | </li> |
102 | 95 | <li data-nav-id="/installation/deployment/" class="dd-item"> |
103 | 96 | <div> |
|
112 | 105 | Configuration |
113 | 106 | </a> |
114 | 107 | </div> |
| 108 | + </li> |
| 109 | + <li data-nav-id="/installation/upgrading-the-operator/" class="dd-item"> |
| 110 | + <div> |
| 111 | + <a href="https://crunchydata.github.io/postgres-operator/installation/upgrading-the-operator/"> |
| 112 | + Upgrading the Operator |
| 113 | + </a> |
| 114 | + </div> |
115 | 115 | </li> |
116 | 116 | </ul> |
117 | 117 | </li> |
@@ -249,7 +249,7 @@ <h1>Getting Started</h1> |
249 | 249 | </ul> |
250 | 250 | </div> |
251 | 251 | <div class="paragraph"> |
252 | | -<p>v3.0, 2018-06-04</p> |
| 252 | +<p>v3.1, 2018-06-13</p> |
253 | 253 | </div> |
254 | 254 | <div class="sect1"> |
255 | 255 | <h2 id="_pgo_commands">pgo Commands</h2> |
@@ -410,6 +410,22 @@ <h3 id="_pgo_create_cluster">pgo create cluster</h3> |
410 | 410 | <p>This will cause a new PVC to be created to hold archive logs. Space |
411 | 411 | is consumed by these logs but archives enable you to perform Point-In-Time-Recovery.</p> |
412 | 412 | </div> |
| 413 | +<div class="paragraph"> |
| 414 | +<p>To enable <strong>auto failover</strong> on this cluster, use the following flag:</p> |
| 415 | +</div> |
| 416 | +<div class="literalblock"> |
| 417 | +<div class="content"> |
| 418 | +<pre>pgo create cluster testcluster --autofail</pre> |
| 419 | +</div> |
| 420 | +</div> |
| 421 | +<div class="paragraph"> |
| 422 | +<p><strong>auto failover</strong> when set on the cluster informs the operator to look |
| 423 | +or watch for <strong>NotReady</strong> events on this cluster, and when those occur |
| 424 | +to create a failover state machine which acts as a timer for the cluster. |
| 425 | +If the timer expires, then a failover is triggered on the cluster turning |
| 426 | +one of the cluster replica pods into the replacement primary pod. See |
| 427 | +the How It Works documentation for more details on <strong>auto failover</strong>.</p> |
| 428 | +</div> |
413 | 429 | </div> |
414 | 430 | <div class="sect2"> |
415 | 431 | <h3 id="_pgo_backup">pgo backup</h3> |
@@ -475,6 +491,18 @@ <h3 id="_pgo_backup">pgo backup</h3> |
475 | 491 | be left intact but the actual Kubernetes Job will be removed prior |
476 | 492 | to creating a new Job with the same name.</p> |
477 | 493 | </div> |
| 494 | +<div class="paragraph"> |
| 495 | +<p>You can override the PVC used by the backup job with the following:</p> |
| 496 | +</div> |
| 497 | +<div class="literalblock"> |
| 498 | +<div class="content"> |
| 499 | +<pre>pgo backup mycluster --pvc-name=myremotepvc</pre> |
| 500 | +</div> |
| 501 | +</div> |
| 502 | +<div class="paragraph"> |
| 503 | +<p>This might be useful for special backup cases, perhaps to create |
| 504 | +a backup on a disaster recovery PVC.</p> |
| 505 | +</div> |
478 | 506 | </div> |
479 | 507 | <div class="sect2"> |
480 | 508 | <h3 id="_pgo_delete_backup">pgo delete backup</h3> |
@@ -894,15 +922,7 @@ <h3 id="_pgo_user">pgo user</h3> |
894 | 922 | </div> |
895 | 923 | <div class="literalblock"> |
896 | 924 | <div class="content"> |
897 | | -<pre>pgo user --delete-user=sally --selector=name=mycluster</pre> |
898 | | -</div> |
899 | | -</div> |
900 | | -<div class="paragraph"> |
901 | | -<p>To delete that user in all clusters:</p> |
902 | | -</div> |
903 | | -<div class="literalblock"> |
904 | | -<div class="content"> |
905 | | -<pre>pgo user --delete-user=sally</pre> |
| 925 | +<pre>pgo user delete user sally --selector=name=mycluster</pre> |
906 | 926 | </div> |
907 | 927 | </div> |
908 | 928 | <div class="paragraph"> |
@@ -951,14 +971,6 @@ <h3 id="_pgo_user">pgo user</h3> |
951 | 971 | specify <strong>valid-days=-1</strong> it will mean the password will not expire (e.g. infinity).</p> |
952 | 972 | </div> |
953 | 973 | <div class="paragraph"> |
954 | | -<p>To drop a user:</p> |
955 | | -</div> |
956 | | -<div class="literalblock"> |
957 | | -<div class="content"> |
958 | | -<pre>pgo user --delete-user=user3 --selector=project=xray</pre> |
959 | | -</div> |
960 | | -</div> |
961 | | -<div class="paragraph"> |
962 | 974 | <p>To see which passwords are set to expire in a given number of days:</p> |
963 | 975 | </div> |
964 | 976 | <div class="literalblock"> |
@@ -1101,15 +1113,27 @@ <h3 id="_pgo_failover">pgo failover</h3> |
1101 | 1113 | cluster.</p> |
1102 | 1114 | </div> |
1103 | 1115 | <div class="paragraph"> |
1104 | | -<p>This process includes the following actions: |
1105 | | - * pick a target replica to become the new primary |
1106 | | - * delete the current primary deployment to avoid user requests from |
1107 | | - going to multiple primary databases (split brain) |
1108 | | - * promote the targeted replica using <strong>pg_ctl promote</strong>, this will |
1109 | | - cause PostgreSQL to go into read-write mode |
1110 | | - * re-label the targeted replica to use the primary labels, this |
1111 | | - will match the primary service selector and cause new requests |
1112 | | - to the primary to be routed to the new primary (targeted replica)</p> |
| 1116 | +<p>This process includes the following actions:</p> |
| 1117 | +</div> |
| 1118 | +<div class="ulist"> |
| 1119 | +<ul> |
| 1120 | +<li> |
| 1121 | +<p>pick a target replica to become the new primary</p> |
| 1122 | +</li> |
| 1123 | +<li> |
| 1124 | +<p>delete the current primary deployment to avoid user requests from |
| 1125 | +going to multiple primary databases (split brain)</p> |
| 1126 | +</li> |
| 1127 | +<li> |
| 1128 | +<p>promote the targeted replica using <strong>pg_ctl promote</strong>, this will |
| 1129 | +cause PostgreSQL to go into read-write mode</p> |
| 1130 | +</li> |
| 1131 | +<li> |
| 1132 | +<p>re-label the targeted replica to use the primary labels, this |
| 1133 | +will match the primary service selector and cause new requests |
| 1134 | +to the primary to be routed to the new primary (targeted replica)</p> |
| 1135 | +</li> |
| 1136 | +</ul> |
1113 | 1137 | </div> |
1114 | 1138 | <div class="paragraph"> |
1115 | 1139 | <p>The command works like this:</p> |
|
0 commit comments