From 4582dee2614a7b5b876e7af6ef25ac6e7d5f1283 Mon Sep 17 00:00:00 2001 From: katmayb Date: Fri, 9 May 2025 09:08:53 -0400 Subject: [PATCH] Update privileges for pcr in v25.2 --- .../alter-virtual-cluster-diagram.html | 420 +++++++++--------- .../create-virtual-cluster-diagram.html | 274 +++++------- .../alter-virtual-cluster-diagram.html | 318 ++++--------- .../create-virtual-cluster-diagram.html | 274 +++++------- .../alter-virtual-cluster-diagram.html | 318 ++++--------- .../create-virtual-cluster-diagram.html | 274 +++++------- .../alter-virtual-cluster-diagram.html | 318 ++++--------- .../alter-virtual-cluster-diagram.html | 318 ++++--------- src/current/v23.2/alter-virtual-cluster.md | 12 - src/current/v23.2/create-virtual-cluster.md | 29 -- src/current/v24.1/alter-virtual-cluster.md | 13 - src/current/v24.1/create-virtual-cluster.md | 30 +- src/current/v24.2/alter-virtual-cluster.md | 13 - src/current/v24.2/create-virtual-cluster.md | 31 +- src/current/v24.3/alter-virtual-cluster.md | 15 - src/current/v24.3/create-virtual-cluster.md | 14 - src/current/v25.1/alter-virtual-cluster.md | 15 - src/current/v25.1/create-virtual-cluster.md | 14 - src/current/v25.2/alter-virtual-cluster.md | 15 +- src/current/v25.2/create-virtual-cluster.md | 8 +- src/current/v25.2/drop-virtual-cluster.md | 2 +- .../set-up-physical-cluster-replication.md | 23 +- 22 files changed, 898 insertions(+), 1850 deletions(-) diff --git a/src/current/_includes/v23.2/physical-replication/alter-virtual-cluster-diagram.html b/src/current/_includes/v23.2/physical-replication/alter-virtual-cluster-diagram.html index d0444ee3525..85e8b136c11 100644 --- a/src/current/_includes/v23.2/physical-replication/alter-virtual-cluster-diagram.html +++ b/src/current/_includes/v23.2/physical-replication/alter-virtual-cluster-diagram.html @@ -1,273 +1,285 @@
- + + y="1" + width="62" + height="32" + class="terminal" + rx="10"/> ALTER + y="1" + width="80" + height="32" + class="terminal" + rx="10"/> VIRTUAL + y="1" + width="82" + height="32" + class="terminal" + rx="10"/> CLUSTER + xlink:title="virtual_cluster_spec"> virtual_cluster_spec + y="67" + width="64" + height="32" + class="terminal" + rx="10"/> PAUSE + y="111" + width="76" + height="32" + class="terminal" + rx="10"/> RESUME + y="67" + width="114" + height="32" + class="terminal" + rx="10"/> REPLICATION + y="155" + width="92" + height="32" + class="terminal" + rx="10"/> COMPLETE + y="155" + width="114" + height="32" + class="terminal" + rx="10"/> REPLICATION + y="155" + width="38" + height="32" + class="terminal" + rx="10"/> TO + y="155" + width="74" + height="32" + class="terminal" + rx="10"/> SYSTEM + y="155" + width="54" + height="32" + class="terminal" + rx="10"/> TIME + xlink:title="timestamp"> timestamp + y="199" + width="70" + height="32" + class="terminal" + rx="10"/> LATEST + y="287" + width="44" + height="32" + class="terminal" + rx="10"/> SET + y="287" + width="114" + height="32" + class="terminal" + rx="10"/> REPLICATION - - - RETENTION - - - = - - - duration + xlink:title="replication_options"> + + + replication_options - - - , - - - GRANT - - - REVOKE - - - CAPABILITY + + + , + + + START + + + REPLICATION + + + OF - - - virtual_cluster_capability_list + xlink:title="virtual_cluster_spec"> + + + virtual_cluster_spec - - - ALL - - - CAPABILITIES - + + + ON + + + + physical_cluster + + + + + opt_with_replication_options + + + + SERVICE + + + SHARED + + + GRANT + + + REVOKE + + + ALL + + + CAPABILITIES + - RENAME - + y="507" + width="76" + height="32" + class="terminal" + rx="10"/> + RENAME + - TO + y="507" + width="38" + height="32" + class="terminal" + rx="10"/> + TO - - - virtual_cluster_spec + xlink:title="virtual_cluster_spec"> + + + virtual_cluster_spec - - - START - - - SERVICE - - - SHARED - + - STOP - + y="551" + width="56" + height="32" + class="terminal" + rx="10"/> + STOP + - SERVICE + y="551" + width="78" + height="32" + class="terminal" + rx="10"/> + SERVICE - - + d="m19 17 h2 m0 0 h10 m62 0 h10 m0 0 h10 m80 0 h10 m0 0 h10 m82 0 h10 m0 0 h10 m148 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-484 66 l2 0 m2 0 l2 0 m2 0 l2 0 m42 0 h10 m64 0 h10 m0 0 h12 m-116 0 h20 m96 0 h20 m-136 0 q10 0 10 10 m116 0 q0 -10 10 -10 m-126 10 v24 m116 0 v-24 m-116 24 q0 10 10 10 m96 0 q10 0 10 -10 m-106 10 h10 m76 0 h10 m20 -44 h10 m114 0 h10 m0 0 h640 m-930 0 h20 m910 0 h20 m-950 0 q10 0 10 10 m930 0 q0 -10 10 -10 m-940 10 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m92 0 h10 m0 0 h10 m114 0 h10 m0 0 h10 m38 0 h10 m20 0 h10 m74 0 h10 m0 0 h10 m54 0 h10 m0 0 h10 m88 0 h10 m-296 0 h20 m276 0 h20 m-316 0 q10 0 10 10 m296 0 q0 -10 10 -10 m-306 10 v24 m296 0 v-24 m-296 24 q0 10 10 10 m276 0 q10 0 10 -10 m-286 10 h10 m70 0 h10 m0 0 h186 m20 -44 h290 m-920 -10 v20 m930 0 v-20 m-930 20 v112 m930 0 v-112 m-930 112 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m44 0 h10 m0 0 h10 m114 0 h10 m20 0 h10 m142 0 h10 m-182 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m162 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-162 0 h10 m24 0 h10 m0 0 h118 m20 44 h510 m-920 -10 v20 m930 0 v-20 m-930 20 v24 m930 0 v-24 m-930 24 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m64 0 h10 m20 0 h10 m114 0 h10 m0 0 h10 m38 0 h10 m0 0 h10 m148 0 h10 m0 0 h10 m40 0 h10 m0 0 h10 m122 0 h10 m0 0 h10 m204 0 h10 m-806 0 h20 m786 0 h20 m-826 0 q10 0 10 10 m806 0 q0 -10 10 -10 m-816 10 v24 m806 0 v-24 m-806 24 q0 10 10 10 m786 0 q10 0 10 -10 m-796 10 h10 m78 0 h10 m0 0 h10 m76 0 h10 m0 0 h592 m-900 -54 v20 m930 0 v-20 m-930 20 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-900 10 h10 m66 0 h10 m0 0 h8 m-114 0 h20 m94 0 h20 m-134 0 q10 0 10 10 m114 0 q0 -10 10 -10 m-124 10 v24 m114 0 v-24 m-114 24 q0 10 10 10 m94 0 q10 0 10 -10 m-104 10 h10 m74 0 h10 m20 -44 h10 m44 0 h10 m0 0 h10 m118 0 h10 m0 0 h574 m-920 -10 v20 m930 0 v-20 m-930 20 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m76 0 h10 m0 0 h10 m38 0 h10 m0 0 h10 m148 0 h10 m0 0 h588 m-920 -10 v20 m930 0 v-20 m-930 20 v24 m930 0 v-24 m-930 24 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m56 0 h10 m0 0 h10 m78 0 h10 m0 0 h736 m23 -484 h-3"/> + +
\ No newline at end of file diff --git a/src/current/_includes/v23.2/physical-replication/create-virtual-cluster-diagram.html b/src/current/_includes/v23.2/physical-replication/create-virtual-cluster-diagram.html index 2f0eff15eb9..e67448d5158 100644 --- a/src/current/_includes/v23.2/physical-replication/create-virtual-cluster-diagram.html +++ b/src/current/_includes/v23.2/physical-replication/create-virtual-cluster-diagram.html @@ -1,171 +1,109 @@
- - - - - - CREATE - - - VIRTUAL - - - CLUSTER - - - IF - - - NOT - - - EXISTS - - - - virtual_cluster_name - - - - LIKE - - - - virtual_cluster_spec - - - - FROM - - - REPLICATION - - - OF - - - - primary_virtual_cluster - - - - ON - - - - primary_connection_string - - - - WITH - - - - replication_options_list - - - - OPTIONS - - - ( - - - - replication_options_list - - - - ) - - - - + + + + + + CREATE + + + VIRTUAL + + + CLUSTER + + + IF + + + NOT + + + EXISTS + + + + virtual_cluster_name + + + + FROM + + + REPLICATION + + + OF + + + + primary_virtual_cluster + + + + ON + + + + primary_connection_string + + + + +
\ No newline at end of file diff --git a/src/current/_includes/v24.1/physical-replication/alter-virtual-cluster-diagram.html b/src/current/_includes/v24.1/physical-replication/alter-virtual-cluster-diagram.html index c5400f6e9ed..85e8b136c11 100644 --- a/src/current/_includes/v24.1/physical-replication/alter-virtual-cluster-diagram.html +++ b/src/current/_includes/v24.1/physical-replication/alter-virtual-cluster-diagram.html @@ -1,6 +1,6 @@
- + @@ -27,6 +27,8 @@ class="terminal" rx="10"/> CLUSTER + virtual_cluster_spec @@ -95,6 +97,8 @@ class="terminal" rx="10"/> TIME + timestamp @@ -123,41 +127,11 @@ class="terminal" rx="10"/> REPLICATION - - - RETENTION - - - EXPIRATION - - - WINDOW - - - = - - - duration + + + + replication_options , - + - START - + START + - REPLICATION - + REPLICATION + - OF - - - virtual_cluster_spec + OF + + + + virtual_cluster_spec - + - ON - - - physical_cluster + ON + + + + physical_cluster - - - WITH - - - RETENTION - - - EXPIRATION - - - WINDOW - - - = - - - duration + + + + opt_with_replication_options - - + - , - - - OPTIONS - - - ( - - - RETENTION - - - EXPIRATION - - - WINDOW - - SERVICE + + - = - - - duration - - - SHARED + + - , - - GRANT + + - ) - - REVOKE + + - SERVICE - - ALL + + - SHARED - + CAPABILITIES + - RENAME - + RENAME + - TO - - - virtual_cluster_spec + TO + + + + virtual_cluster_spec - + - STOP - + STOP + - SERVICE - - - GRANT - - - REVOKE - - - ALL - - - CAPABILITIES - - - CAPABILITY - - - virtual_cluster_capability_list - + SERVICE - - + d="m19 17 h2 m0 0 h10 m62 0 h10 m0 0 h10 m80 0 h10 m0 0 h10 m82 0 h10 m0 0 h10 m148 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-484 66 l2 0 m2 0 l2 0 m2 0 l2 0 m42 0 h10 m64 0 h10 m0 0 h12 m-116 0 h20 m96 0 h20 m-136 0 q10 0 10 10 m116 0 q0 -10 10 -10 m-126 10 v24 m116 0 v-24 m-116 24 q0 10 10 10 m96 0 q10 0 10 -10 m-106 10 h10 m76 0 h10 m20 -44 h10 m114 0 h10 m0 0 h640 m-930 0 h20 m910 0 h20 m-950 0 q10 0 10 10 m930 0 q0 -10 10 -10 m-940 10 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m92 0 h10 m0 0 h10 m114 0 h10 m0 0 h10 m38 0 h10 m20 0 h10 m74 0 h10 m0 0 h10 m54 0 h10 m0 0 h10 m88 0 h10 m-296 0 h20 m276 0 h20 m-316 0 q10 0 10 10 m296 0 q0 -10 10 -10 m-306 10 v24 m296 0 v-24 m-296 24 q0 10 10 10 m276 0 q10 0 10 -10 m-286 10 h10 m70 0 h10 m0 0 h186 m20 -44 h290 m-920 -10 v20 m930 0 v-20 m-930 20 v112 m930 0 v-112 m-930 112 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m44 0 h10 m0 0 h10 m114 0 h10 m20 0 h10 m142 0 h10 m-182 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m162 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-162 0 h10 m24 0 h10 m0 0 h118 m20 44 h510 m-920 -10 v20 m930 0 v-20 m-930 20 v24 m930 0 v-24 m-930 24 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m64 0 h10 m20 0 h10 m114 0 h10 m0 0 h10 m38 0 h10 m0 0 h10 m148 0 h10 m0 0 h10 m40 0 h10 m0 0 h10 m122 0 h10 m0 0 h10 m204 0 h10 m-806 0 h20 m786 0 h20 m-826 0 q10 0 10 10 m806 0 q0 -10 10 -10 m-816 10 v24 m806 0 v-24 m-806 24 q0 10 10 10 m786 0 q10 0 10 -10 m-796 10 h10 m78 0 h10 m0 0 h10 m76 0 h10 m0 0 h592 m-900 -54 v20 m930 0 v-20 m-930 20 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-900 10 h10 m66 0 h10 m0 0 h8 m-114 0 h20 m94 0 h20 m-134 0 q10 0 10 10 m114 0 q0 -10 10 -10 m-124 10 v24 m114 0 v-24 m-114 24 q0 10 10 10 m94 0 q10 0 10 -10 m-104 10 h10 m74 0 h10 m20 -44 h10 m44 0 h10 m0 0 h10 m118 0 h10 m0 0 h574 m-920 -10 v20 m930 0 v-20 m-930 20 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m76 0 h10 m0 0 h10 m38 0 h10 m0 0 h10 m148 0 h10 m0 0 h588 m-920 -10 v20 m930 0 v-20 m-930 20 v24 m930 0 v-24 m-930 24 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m56 0 h10 m0 0 h10 m78 0 h10 m0 0 h736 m23 -484 h-3"/> + +
\ No newline at end of file diff --git a/src/current/_includes/v24.1/physical-replication/create-virtual-cluster-diagram.html b/src/current/_includes/v24.1/physical-replication/create-virtual-cluster-diagram.html index 2f0eff15eb9..e67448d5158 100644 --- a/src/current/_includes/v24.1/physical-replication/create-virtual-cluster-diagram.html +++ b/src/current/_includes/v24.1/physical-replication/create-virtual-cluster-diagram.html @@ -1,171 +1,109 @@
- - - - - - CREATE - - - VIRTUAL - - - CLUSTER - - - IF - - - NOT - - - EXISTS - - - - virtual_cluster_name - - - - LIKE - - - - virtual_cluster_spec - - - - FROM - - - REPLICATION - - - OF - - - - primary_virtual_cluster - - - - ON - - - - primary_connection_string - - - - WITH - - - - replication_options_list - - - - OPTIONS - - - ( - - - - replication_options_list - - - - ) - - - - + + + + + + CREATE + + + VIRTUAL + + + CLUSTER + + + IF + + + NOT + + + EXISTS + + + + virtual_cluster_name + + + + FROM + + + REPLICATION + + + OF + + + + primary_virtual_cluster + + + + ON + + + + primary_connection_string + + + + +
\ No newline at end of file diff --git a/src/current/_includes/v24.2/physical-replication/alter-virtual-cluster-diagram.html b/src/current/_includes/v24.2/physical-replication/alter-virtual-cluster-diagram.html index c5400f6e9ed..85e8b136c11 100644 --- a/src/current/_includes/v24.2/physical-replication/alter-virtual-cluster-diagram.html +++ b/src/current/_includes/v24.2/physical-replication/alter-virtual-cluster-diagram.html @@ -1,6 +1,6 @@
- + @@ -27,6 +27,8 @@ class="terminal" rx="10"/> CLUSTER + virtual_cluster_spec @@ -95,6 +97,8 @@ class="terminal" rx="10"/> TIME + timestamp @@ -123,41 +127,11 @@ class="terminal" rx="10"/> REPLICATION - - - RETENTION - - - EXPIRATION - - - WINDOW - - - = - - - duration + + + + replication_options , - + - START - + START + - REPLICATION - + REPLICATION + - OF - - - virtual_cluster_spec + OF + + + + virtual_cluster_spec - + - ON - - - physical_cluster + ON + + + + physical_cluster - - - WITH - - - RETENTION - - - EXPIRATION - - - WINDOW - - - = - - - duration + + + + opt_with_replication_options - - + - , - - - OPTIONS - - - ( - - - RETENTION - - - EXPIRATION - - - WINDOW - - SERVICE + + - = - - - duration - - - SHARED + + - , - - GRANT + + - ) - - REVOKE + + - SERVICE - - ALL + + - SHARED - + CAPABILITIES + - RENAME - + RENAME + - TO - - - virtual_cluster_spec + TO + + + + virtual_cluster_spec - + - STOP - + STOP + - SERVICE - - - GRANT - - - REVOKE - - - ALL - - - CAPABILITIES - - - CAPABILITY - - - virtual_cluster_capability_list - + SERVICE - - + d="m19 17 h2 m0 0 h10 m62 0 h10 m0 0 h10 m80 0 h10 m0 0 h10 m82 0 h10 m0 0 h10 m148 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-484 66 l2 0 m2 0 l2 0 m2 0 l2 0 m42 0 h10 m64 0 h10 m0 0 h12 m-116 0 h20 m96 0 h20 m-136 0 q10 0 10 10 m116 0 q0 -10 10 -10 m-126 10 v24 m116 0 v-24 m-116 24 q0 10 10 10 m96 0 q10 0 10 -10 m-106 10 h10 m76 0 h10 m20 -44 h10 m114 0 h10 m0 0 h640 m-930 0 h20 m910 0 h20 m-950 0 q10 0 10 10 m930 0 q0 -10 10 -10 m-940 10 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m92 0 h10 m0 0 h10 m114 0 h10 m0 0 h10 m38 0 h10 m20 0 h10 m74 0 h10 m0 0 h10 m54 0 h10 m0 0 h10 m88 0 h10 m-296 0 h20 m276 0 h20 m-316 0 q10 0 10 10 m296 0 q0 -10 10 -10 m-306 10 v24 m296 0 v-24 m-296 24 q0 10 10 10 m276 0 q10 0 10 -10 m-286 10 h10 m70 0 h10 m0 0 h186 m20 -44 h290 m-920 -10 v20 m930 0 v-20 m-930 20 v112 m930 0 v-112 m-930 112 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m44 0 h10 m0 0 h10 m114 0 h10 m20 0 h10 m142 0 h10 m-182 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m162 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-162 0 h10 m24 0 h10 m0 0 h118 m20 44 h510 m-920 -10 v20 m930 0 v-20 m-930 20 v24 m930 0 v-24 m-930 24 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m64 0 h10 m20 0 h10 m114 0 h10 m0 0 h10 m38 0 h10 m0 0 h10 m148 0 h10 m0 0 h10 m40 0 h10 m0 0 h10 m122 0 h10 m0 0 h10 m204 0 h10 m-806 0 h20 m786 0 h20 m-826 0 q10 0 10 10 m806 0 q0 -10 10 -10 m-816 10 v24 m806 0 v-24 m-806 24 q0 10 10 10 m786 0 q10 0 10 -10 m-796 10 h10 m78 0 h10 m0 0 h10 m76 0 h10 m0 0 h592 m-900 -54 v20 m930 0 v-20 m-930 20 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-900 10 h10 m66 0 h10 m0 0 h8 m-114 0 h20 m94 0 h20 m-134 0 q10 0 10 10 m114 0 q0 -10 10 -10 m-124 10 v24 m114 0 v-24 m-114 24 q0 10 10 10 m94 0 q10 0 10 -10 m-104 10 h10 m74 0 h10 m20 -44 h10 m44 0 h10 m0 0 h10 m118 0 h10 m0 0 h574 m-920 -10 v20 m930 0 v-20 m-930 20 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m76 0 h10 m0 0 h10 m38 0 h10 m0 0 h10 m148 0 h10 m0 0 h588 m-920 -10 v20 m930 0 v-20 m-930 20 v24 m930 0 v-24 m-930 24 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m56 0 h10 m0 0 h10 m78 0 h10 m0 0 h736 m23 -484 h-3"/> + +
\ No newline at end of file diff --git a/src/current/_includes/v24.2/physical-replication/create-virtual-cluster-diagram.html b/src/current/_includes/v24.2/physical-replication/create-virtual-cluster-diagram.html index 2f0eff15eb9..e67448d5158 100644 --- a/src/current/_includes/v24.2/physical-replication/create-virtual-cluster-diagram.html +++ b/src/current/_includes/v24.2/physical-replication/create-virtual-cluster-diagram.html @@ -1,171 +1,109 @@
- - - - - - CREATE - - - VIRTUAL - - - CLUSTER - - - IF - - - NOT - - - EXISTS - - - - virtual_cluster_name - - - - LIKE - - - - virtual_cluster_spec - - - - FROM - - - REPLICATION - - - OF - - - - primary_virtual_cluster - - - - ON - - - - primary_connection_string - - - - WITH - - - - replication_options_list - - - - OPTIONS - - - ( - - - - replication_options_list - - - - ) - - - - + + + + + + CREATE + + + VIRTUAL + + + CLUSTER + + + IF + + + NOT + + + EXISTS + + + + virtual_cluster_name + + + + FROM + + + REPLICATION + + + OF + + + + primary_virtual_cluster + + + + ON + + + + primary_connection_string + + + + +
\ No newline at end of file diff --git a/src/current/_includes/v24.3/physical-replication/alter-virtual-cluster-diagram.html b/src/current/_includes/v24.3/physical-replication/alter-virtual-cluster-diagram.html index c5400f6e9ed..85e8b136c11 100644 --- a/src/current/_includes/v24.3/physical-replication/alter-virtual-cluster-diagram.html +++ b/src/current/_includes/v24.3/physical-replication/alter-virtual-cluster-diagram.html @@ -1,6 +1,6 @@
- + @@ -27,6 +27,8 @@ class="terminal" rx="10"/> CLUSTER + virtual_cluster_spec @@ -95,6 +97,8 @@ class="terminal" rx="10"/> TIME + timestamp @@ -123,41 +127,11 @@ class="terminal" rx="10"/> REPLICATION - - - RETENTION - - - EXPIRATION - - - WINDOW - - - = - - - duration + + + + replication_options , - + - START - + START + - REPLICATION - + REPLICATION + - OF - - - virtual_cluster_spec + OF + + + + virtual_cluster_spec - + - ON - - - physical_cluster + ON + + + + physical_cluster - - - WITH - - - RETENTION - - - EXPIRATION - - - WINDOW - - - = - - - duration + + + + opt_with_replication_options - - + - , - - - OPTIONS - - - ( - - - RETENTION - - - EXPIRATION - - - WINDOW - - SERVICE + + - = - - - duration - - - SHARED + + - , - - GRANT + + - ) - - REVOKE + + - SERVICE - - ALL + + - SHARED - + CAPABILITIES + - RENAME - + RENAME + - TO - - - virtual_cluster_spec + TO + + + + virtual_cluster_spec - + - STOP - + STOP + - SERVICE - - - GRANT - - - REVOKE - - - ALL - - - CAPABILITIES - - - CAPABILITY - - - virtual_cluster_capability_list - + SERVICE - - + d="m19 17 h2 m0 0 h10 m62 0 h10 m0 0 h10 m80 0 h10 m0 0 h10 m82 0 h10 m0 0 h10 m148 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-484 66 l2 0 m2 0 l2 0 m2 0 l2 0 m42 0 h10 m64 0 h10 m0 0 h12 m-116 0 h20 m96 0 h20 m-136 0 q10 0 10 10 m116 0 q0 -10 10 -10 m-126 10 v24 m116 0 v-24 m-116 24 q0 10 10 10 m96 0 q10 0 10 -10 m-106 10 h10 m76 0 h10 m20 -44 h10 m114 0 h10 m0 0 h640 m-930 0 h20 m910 0 h20 m-950 0 q10 0 10 10 m930 0 q0 -10 10 -10 m-940 10 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m92 0 h10 m0 0 h10 m114 0 h10 m0 0 h10 m38 0 h10 m20 0 h10 m74 0 h10 m0 0 h10 m54 0 h10 m0 0 h10 m88 0 h10 m-296 0 h20 m276 0 h20 m-316 0 q10 0 10 10 m296 0 q0 -10 10 -10 m-306 10 v24 m296 0 v-24 m-296 24 q0 10 10 10 m276 0 q10 0 10 -10 m-286 10 h10 m70 0 h10 m0 0 h186 m20 -44 h290 m-920 -10 v20 m930 0 v-20 m-930 20 v112 m930 0 v-112 m-930 112 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m44 0 h10 m0 0 h10 m114 0 h10 m20 0 h10 m142 0 h10 m-182 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m162 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-162 0 h10 m24 0 h10 m0 0 h118 m20 44 h510 m-920 -10 v20 m930 0 v-20 m-930 20 v24 m930 0 v-24 m-930 24 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m64 0 h10 m20 0 h10 m114 0 h10 m0 0 h10 m38 0 h10 m0 0 h10 m148 0 h10 m0 0 h10 m40 0 h10 m0 0 h10 m122 0 h10 m0 0 h10 m204 0 h10 m-806 0 h20 m786 0 h20 m-826 0 q10 0 10 10 m806 0 q0 -10 10 -10 m-816 10 v24 m806 0 v-24 m-806 24 q0 10 10 10 m786 0 q10 0 10 -10 m-796 10 h10 m78 0 h10 m0 0 h10 m76 0 h10 m0 0 h592 m-900 -54 v20 m930 0 v-20 m-930 20 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-900 10 h10 m66 0 h10 m0 0 h8 m-114 0 h20 m94 0 h20 m-134 0 q10 0 10 10 m114 0 q0 -10 10 -10 m-124 10 v24 m114 0 v-24 m-114 24 q0 10 10 10 m94 0 q10 0 10 -10 m-104 10 h10 m74 0 h10 m20 -44 h10 m44 0 h10 m0 0 h10 m118 0 h10 m0 0 h574 m-920 -10 v20 m930 0 v-20 m-930 20 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m76 0 h10 m0 0 h10 m38 0 h10 m0 0 h10 m148 0 h10 m0 0 h588 m-920 -10 v20 m930 0 v-20 m-930 20 v24 m930 0 v-24 m-930 24 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m56 0 h10 m0 0 h10 m78 0 h10 m0 0 h736 m23 -484 h-3"/> + +
\ No newline at end of file diff --git a/src/current/_includes/v25.1/physical-replication/alter-virtual-cluster-diagram.html b/src/current/_includes/v25.1/physical-replication/alter-virtual-cluster-diagram.html index c5400f6e9ed..85e8b136c11 100644 --- a/src/current/_includes/v25.1/physical-replication/alter-virtual-cluster-diagram.html +++ b/src/current/_includes/v25.1/physical-replication/alter-virtual-cluster-diagram.html @@ -1,6 +1,6 @@
- + @@ -27,6 +27,8 @@ class="terminal" rx="10"/> CLUSTER + virtual_cluster_spec @@ -95,6 +97,8 @@ class="terminal" rx="10"/> TIME + timestamp @@ -123,41 +127,11 @@ class="terminal" rx="10"/> REPLICATION - - - RETENTION - - - EXPIRATION - - - WINDOW - - - = - - - duration + + + + replication_options , - + - START - + START + - REPLICATION - + REPLICATION + - OF - - - virtual_cluster_spec + OF + + + + virtual_cluster_spec - + - ON - - - physical_cluster + ON + + + + physical_cluster - - - WITH - - - RETENTION - - - EXPIRATION - - - WINDOW - - - = - - - duration + + + + opt_with_replication_options - - + - , - - - OPTIONS - - - ( - - - RETENTION - - - EXPIRATION - - - WINDOW - - SERVICE + + - = - - - duration - - - SHARED + + - , - - GRANT + + - ) - - REVOKE + + - SERVICE - - ALL + + - SHARED - + CAPABILITIES + - RENAME - + RENAME + - TO - - - virtual_cluster_spec + TO + + + + virtual_cluster_spec - + - STOP - + STOP + - SERVICE - - - GRANT - - - REVOKE - - - ALL - - - CAPABILITIES - - - CAPABILITY - - - virtual_cluster_capability_list - + SERVICE - - + d="m19 17 h2 m0 0 h10 m62 0 h10 m0 0 h10 m80 0 h10 m0 0 h10 m82 0 h10 m0 0 h10 m148 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-484 66 l2 0 m2 0 l2 0 m2 0 l2 0 m42 0 h10 m64 0 h10 m0 0 h12 m-116 0 h20 m96 0 h20 m-136 0 q10 0 10 10 m116 0 q0 -10 10 -10 m-126 10 v24 m116 0 v-24 m-116 24 q0 10 10 10 m96 0 q10 0 10 -10 m-106 10 h10 m76 0 h10 m20 -44 h10 m114 0 h10 m0 0 h640 m-930 0 h20 m910 0 h20 m-950 0 q10 0 10 10 m930 0 q0 -10 10 -10 m-940 10 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m92 0 h10 m0 0 h10 m114 0 h10 m0 0 h10 m38 0 h10 m20 0 h10 m74 0 h10 m0 0 h10 m54 0 h10 m0 0 h10 m88 0 h10 m-296 0 h20 m276 0 h20 m-316 0 q10 0 10 10 m296 0 q0 -10 10 -10 m-306 10 v24 m296 0 v-24 m-296 24 q0 10 10 10 m276 0 q10 0 10 -10 m-286 10 h10 m70 0 h10 m0 0 h186 m20 -44 h290 m-920 -10 v20 m930 0 v-20 m-930 20 v112 m930 0 v-112 m-930 112 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m44 0 h10 m0 0 h10 m114 0 h10 m20 0 h10 m142 0 h10 m-182 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m162 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-162 0 h10 m24 0 h10 m0 0 h118 m20 44 h510 m-920 -10 v20 m930 0 v-20 m-930 20 v24 m930 0 v-24 m-930 24 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m64 0 h10 m20 0 h10 m114 0 h10 m0 0 h10 m38 0 h10 m0 0 h10 m148 0 h10 m0 0 h10 m40 0 h10 m0 0 h10 m122 0 h10 m0 0 h10 m204 0 h10 m-806 0 h20 m786 0 h20 m-826 0 q10 0 10 10 m806 0 q0 -10 10 -10 m-816 10 v24 m806 0 v-24 m-806 24 q0 10 10 10 m786 0 q10 0 10 -10 m-796 10 h10 m78 0 h10 m0 0 h10 m76 0 h10 m0 0 h592 m-900 -54 v20 m930 0 v-20 m-930 20 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-900 10 h10 m66 0 h10 m0 0 h8 m-114 0 h20 m94 0 h20 m-134 0 q10 0 10 10 m114 0 q0 -10 10 -10 m-124 10 v24 m114 0 v-24 m-114 24 q0 10 10 10 m94 0 q10 0 10 -10 m-104 10 h10 m74 0 h10 m20 -44 h10 m44 0 h10 m0 0 h10 m118 0 h10 m0 0 h574 m-920 -10 v20 m930 0 v-20 m-930 20 v68 m930 0 v-68 m-930 68 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m76 0 h10 m0 0 h10 m38 0 h10 m0 0 h10 m148 0 h10 m0 0 h588 m-920 -10 v20 m930 0 v-20 m-930 20 v24 m930 0 v-24 m-930 24 q0 10 10 10 m910 0 q10 0 10 -10 m-920 10 h10 m56 0 h10 m0 0 h10 m78 0 h10 m0 0 h736 m23 -484 h-3"/> + +
\ No newline at end of file diff --git a/src/current/v23.2/alter-virtual-cluster.md b/src/current/v23.2/alter-virtual-cluster.md index ef229f207a9..526a9a8a9b0 100644 --- a/src/current/v23.2/alter-virtual-cluster.md +++ b/src/current/v23.2/alter-virtual-cluster.md @@ -41,7 +41,6 @@ Parameter | Description `PAUSE REPLICATION` | Pause the replication stream. `RESUME REPLICATION` | Resume the replication stream. `COMPLETE REPLICATION TO` | Set the time to complete the replication. Use:
-`SET REPLICATION RETENTION = duration` | Change the [duration]({% link {{ page.version.version }}/interval.md %}) of the retention window that will control how far in the past you can [cut over]({% link {{ page.version.version }}/cutover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} `GRANT ALL CAPABILITIES` | Grant a virtual cluster all [capabilities]({% link {{ page.version.version }}/create-virtual-cluster.md %}#capabilities). `REVOKE ALL CAPABILITIES` | Revoke all [capabilities]({% link {{ page.version.version }}/create-virtual-cluster.md %}#capabilities) from a virtual cluster. `GRANT CAPABILITY virtual_cluster_capability_list` | Specify a [capability]({% link {{ page.version.version }}/create-virtual-cluster.md %}#capabilities) to grant to a virtual cluster. @@ -66,17 +65,6 @@ You can use either: - `SYSTEM TIME` to specify a [timestamp]({% link {{ page.version.version }}/as-of-system-time.md %}). - `LATEST` to specify the most recent replicated timestamp. -### Set a retention window - -You can change the retention window to protect data from [garbage collection]({% link {{ page.version.version }}/architecture/storage-layer.md %}#garbage-collection). The retention window controls how far in the past you can [cut over]({% link {{ page.version.version }}/cutover-replication.md %}) to: - -{% include_cached copy-clipboard.html %} -~~~ sql -ALTER VIRTUAL CLUSTER application SET REPLICATION RETENTION = '24h'; -~~~ - -{% include {{ page.version.version }}/physical-replication/retention.md %} - ### Start a virtual cluster When a virtual cluster is [`ready`]({% link {{ page.version.version }}/show-virtual-cluster.md %}#responses) after initiating the cutover process, you must start the service so that the virtual cluster is ready to accept SQL connections: diff --git a/src/current/v23.2/create-virtual-cluster.md b/src/current/v23.2/create-virtual-cluster.md index 1deea140f8e..d2d3afb4a56 100644 --- a/src/current/v23.2/create-virtual-cluster.md +++ b/src/current/v23.2/create-virtual-cluster.md @@ -38,16 +38,8 @@ GRANT SYSTEM MANAGEVIRTUALCLUSTER TO user; Parameter | Description ----------+------------ `virtual_cluster_name` | The name for the new virtual cluster. -`LIKE virtual_cluster_spec` | Creates a virtual cluster with the same [capabilities](#capabilities) and settings as another virtual cluster. `primary_virtual_cluster` | The name of the primary's virtual cluster to replicate. `primary_connection_string` | The PostgreSQL connection string to the primary cluster. Refer to [Connection string](#connection-string) for more detail. -`replication_options_list`| Options to modify the replication streams. Refer to [Options](#options). - -## Options - -Option | Description --------+------------- -`RETENTION` | Configure a [retention window]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}#cutover-and-promotion-process) that will control how far in the past you can [cut over]({% link {{ page.version.version }}/cutover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} ## Connection string @@ -69,14 +61,6 @@ Value | Description `sslmode=verify-full` | The `verify-full` secure connection type. `sslrootcert={primary cert}` | The path to the primary cluster's CA certificate on the standby cluster. -## Capabilities - -{{site.data.alerts.callout_info}} -Cockroach Labs does not recommend changing the default capabilities of created virtual clusters. -{{site.data.alerts.end}} - -_Capabilities_ control what a virtual cluster can do. The [configuration profile]({% link {{ page.version.version }}/set-up-physical-cluster-replication.md %}#start-the-standby-cluster) included at startup creates the `template` virtual cluster with the same set of capabilities per CockroachDB version. When you start a replication stream, you can specify the `template` VC with `LIKE` to ensure other virtual clusters on the standby cluster will work in the same way. `LIKE` will refer to a virtual cluster on the CockroachDB cluster you're running the statement from. - ## Examples ### Start a replication stream @@ -90,19 +74,6 @@ CREATE VIRTUAL CLUSTER application LIKE template FROM REPLICATION OF application This will create a virtual cluster in the standby cluster that is based on the `template` virtual cluster, which is created during [cluster startup with `--config-profile`]({% link {{ page.version.version }}/set-up-physical-cluster-replication.md %}#start-the-primary-cluster). The standby's system virtual cluster will connect to the primary cluster to initiate the replication stream job. For detail on the replication stream, refer to the [Responses]({% link {{ page.version.version }}/show-virtual-cluster.md %}#responses) for `SHOW VIRTUAL CLUSTER`. -### Specify a retention window for a replication stream - -When you initiate a replication stream, you can specify a retention window to protect data from [garbage collection]({% link {{ page.version.version }}/architecture/storage-layer.md %}#garbage-collection). The retention window controls how far in the past you can [cut over]({% link {{ page.version.version }}/cutover-replication.md %}) to: - -{% include_cached copy-clipboard.html %} -~~~ sql -CREATE VIRTUAL CLUSTER application LIKE template FROM REPLICATION OF application ON 'postgresql://{connection string to primary}' WITH RETENTION '36h'; -~~~ - -This will initiate a replication stream from the primary cluster into the standby cluster's new `standbyapplication` virtual cluster. The `RETENTION` option allows you to specify a timestamp in the past for cutover to the standby cluster. After cutover, the `standbyapplication` will be transactionally consistent to any timestamp within that retention window. - -{% include {{ page.version.version }}/physical-replication/retention.md %} - ## See also - [`DROP VIRTUAL CLUSTER`]({% link {{ page.version.version }}/drop-virtual-cluster.md %}) diff --git a/src/current/v24.1/alter-virtual-cluster.md b/src/current/v24.1/alter-virtual-cluster.md index f90993694c8..1a7dd4f0b83 100644 --- a/src/current/v24.1/alter-virtual-cluster.md +++ b/src/current/v24.1/alter-virtual-cluster.md @@ -41,8 +41,6 @@ Parameter | Description `PAUSE REPLICATION` | Pause the replication stream. `RESUME REPLICATION` | Resume the replication stream. `COMPLETE REPLICATION TO` | Set the time to complete the replication. Use:
-`SET REPLICATION RETENTION = duration` | Change the [duration]({% link {{ page.version.version }}/interval.md %}) of the retention window that will control how far in the past you can [cut over]({% link {{ page.version.version }}/cutover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} -`SET REPLICATION EXPIRATION WINDOW = duration` | Override the default producer job's expiration window of 24 hours. The producer job expiration window determines how long the producer job will continue to run without a heartbeat from the consumer job. Refer to the [Technical Overview]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}) for more details. `START REPLICATION OF virtual_cluster_spec ON physical_cluster` | Reset a virtual cluster to the time when the virtual cluster on the promoted standby diverged from it. To reuse as much of the existing data on the original primary cluster as possible, you can run this statement as part of the [cutback]({% link {{ page.version.version }}/cutover-replication.md %}#cutback) process. This command fails if the virtual cluster was not originally replicated from the original primary cluster. `START SERVICE SHARED` | Start a virtual cluster so it is ready to accept SQL connections after cutover. `RENAME TO virtual_cluster_spec` | Rename a virtual cluster. @@ -83,17 +81,6 @@ The original primary virtual cluster may be almost up to date with the promoted If you started the original PCR stream on an existing cluster without virtualization enabled, refer to the [Cut back after PCR from an existing cluster]({% link {{ page.version.version }}/cutover-replication.md %}) section for instructions. {{site.data.alerts.end}} -### Set a retention window - -You can change the retention window to protect data from [garbage collection]({% link {{ page.version.version }}/architecture/storage-layer.md %}#garbage-collection). The retention window controls how far in the past you can [cut over]({% link {{ page.version.version }}/cutover-replication.md %}) to: - -{% include_cached copy-clipboard.html %} -~~~ sql -ALTER VIRTUAL CLUSTER main SET REPLICATION RETENTION = '24h'; -~~~ - -{% include {{ page.version.version }}/physical-replication/retention.md %} - ### Start a virtual cluster When a virtual cluster is [`ready`]({% link {{ page.version.version }}/show-virtual-cluster.md %}#responses) after initiating the cutover process, you must start the service so that the virtual cluster is ready to accept SQL connections: diff --git a/src/current/v24.1/create-virtual-cluster.md b/src/current/v24.1/create-virtual-cluster.md index df3351fee43..64432bcd409 100644 --- a/src/current/v24.1/create-virtual-cluster.md +++ b/src/current/v24.1/create-virtual-cluster.md @@ -40,17 +40,10 @@ GRANT SYSTEM MANAGEVIRTUALCLUSTER TO user; Parameter | Description ----------+------------ `virtual_cluster_name` | The name for the new virtual cluster. -`LIKE virtual_cluster_spec` | Creates a virtual cluster with the same [capabilities](#capabilities) and settings as another virtual cluster. `primary_virtual_cluster` | The name of the primary's virtual cluster to replicate. `primary_connection_string` | The PostgreSQL connection string to the primary cluster. Refer to [Connection string](#connection-string) for more detail. `replication_options_list`| Options to modify the replication streams. Refer to [Options](#options). -## Options - -Option | Description --------+------------- -`RETENTION` | Configure a [retention window]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}#cutover-and-promotion-process) that will control how far in the past you can [cut over]({% link {{ page.version.version }}/cutover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} - ## Connection string When you [initiate a replication stream]({% link {{ page.version.version }}/set-up-physical-cluster-replication.md %}#step-4-start-replication) from the standby cluster, it is necessary to pass a connection string to the system virtual cluster on the primary cluster: @@ -71,15 +64,7 @@ Value | Description `sslmode=verify-full` | The `verify-full` secure connection type. `sslrootcert={primary cert}` | The path to the primary cluster's CA certificate on the standby cluster. -## Capabilities - -{{site.data.alerts.callout_info}} -Cockroach Labs does not recommend changing the default capabilities of created virtual clusters. -{{site.data.alerts.end}} - -_Capabilities_ control what a virtual cluster can do. When you start a replication stream, you can specify a virtual cluster with `LIKE` to ensure other virtual clusters on the standby cluster will work in the same way. `LIKE` will refer to a virtual cluster on the CockroachDB cluster you're running the statement from. - -## Examples +## Example ### Start a replication stream @@ -92,19 +77,6 @@ CREATE VIRTUAL CLUSTER main FROM REPLICATION OF main ON 'postgresql://{connectio This will create a `main` virtual cluster in the standby cluster. The standby's system virtual cluster will connect to the primary cluster to initiate the replication stream job. For detail on the replication stream, refer to the [Responses]({% link {{ page.version.version }}/show-virtual-cluster.md %}#responses) for `SHOW VIRTUAL CLUSTER`. -### Specify a retention window for a replication stream - -When you initiate a replication stream, you can specify a retention window to protect data from [garbage collection]({% link {{ page.version.version }}/architecture/storage-layer.md %}#garbage-collection). The retention window controls how far in the past you can [cut over]({% link {{ page.version.version }}/cutover-replication.md %}) to: - -{% include_cached copy-clipboard.html %} -~~~ sql -CREATE VIRTUAL CLUSTER main FROM REPLICATION OF main ON 'postgresql://{connection string to primary}' WITH RETENTION '36h'; -~~~ - -This will initiate a replication stream from the primary cluster into the standby cluster's new `main` virtual cluster. The `RETENTION` option allows you to specify a timestamp in the past for cutover to the standby cluster. After cutover, the standby `main` virtual cluster will be transactionally consistent to any timestamp within that retention window. - -{% include {{ page.version.version }}/physical-replication/retention.md %} - ## See also - [`DROP VIRTUAL CLUSTER`]({% link {{ page.version.version }}/drop-virtual-cluster.md %}) diff --git a/src/current/v24.2/alter-virtual-cluster.md b/src/current/v24.2/alter-virtual-cluster.md index f90993694c8..1a7dd4f0b83 100644 --- a/src/current/v24.2/alter-virtual-cluster.md +++ b/src/current/v24.2/alter-virtual-cluster.md @@ -41,8 +41,6 @@ Parameter | Description `PAUSE REPLICATION` | Pause the replication stream. `RESUME REPLICATION` | Resume the replication stream. `COMPLETE REPLICATION TO` | Set the time to complete the replication. Use:
-`SET REPLICATION RETENTION = duration` | Change the [duration]({% link {{ page.version.version }}/interval.md %}) of the retention window that will control how far in the past you can [cut over]({% link {{ page.version.version }}/cutover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} -`SET REPLICATION EXPIRATION WINDOW = duration` | Override the default producer job's expiration window of 24 hours. The producer job expiration window determines how long the producer job will continue to run without a heartbeat from the consumer job. Refer to the [Technical Overview]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}) for more details. `START REPLICATION OF virtual_cluster_spec ON physical_cluster` | Reset a virtual cluster to the time when the virtual cluster on the promoted standby diverged from it. To reuse as much of the existing data on the original primary cluster as possible, you can run this statement as part of the [cutback]({% link {{ page.version.version }}/cutover-replication.md %}#cutback) process. This command fails if the virtual cluster was not originally replicated from the original primary cluster. `START SERVICE SHARED` | Start a virtual cluster so it is ready to accept SQL connections after cutover. `RENAME TO virtual_cluster_spec` | Rename a virtual cluster. @@ -83,17 +81,6 @@ The original primary virtual cluster may be almost up to date with the promoted If you started the original PCR stream on an existing cluster without virtualization enabled, refer to the [Cut back after PCR from an existing cluster]({% link {{ page.version.version }}/cutover-replication.md %}) section for instructions. {{site.data.alerts.end}} -### Set a retention window - -You can change the retention window to protect data from [garbage collection]({% link {{ page.version.version }}/architecture/storage-layer.md %}#garbage-collection). The retention window controls how far in the past you can [cut over]({% link {{ page.version.version }}/cutover-replication.md %}) to: - -{% include_cached copy-clipboard.html %} -~~~ sql -ALTER VIRTUAL CLUSTER main SET REPLICATION RETENTION = '24h'; -~~~ - -{% include {{ page.version.version }}/physical-replication/retention.md %} - ### Start a virtual cluster When a virtual cluster is [`ready`]({% link {{ page.version.version }}/show-virtual-cluster.md %}#responses) after initiating the cutover process, you must start the service so that the virtual cluster is ready to accept SQL connections: diff --git a/src/current/v24.2/create-virtual-cluster.md b/src/current/v24.2/create-virtual-cluster.md index df3351fee43..a140eecde51 100644 --- a/src/current/v24.2/create-virtual-cluster.md +++ b/src/current/v24.2/create-virtual-cluster.md @@ -40,16 +40,8 @@ GRANT SYSTEM MANAGEVIRTUALCLUSTER TO user; Parameter | Description ----------+------------ `virtual_cluster_name` | The name for the new virtual cluster. -`LIKE virtual_cluster_spec` | Creates a virtual cluster with the same [capabilities](#capabilities) and settings as another virtual cluster. `primary_virtual_cluster` | The name of the primary's virtual cluster to replicate. `primary_connection_string` | The PostgreSQL connection string to the primary cluster. Refer to [Connection string](#connection-string) for more detail. -`replication_options_list`| Options to modify the replication streams. Refer to [Options](#options). - -## Options - -Option | Description --------+------------- -`RETENTION` | Configure a [retention window]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}#cutover-and-promotion-process) that will control how far in the past you can [cut over]({% link {{ page.version.version }}/cutover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} ## Connection string @@ -71,15 +63,7 @@ Value | Description `sslmode=verify-full` | The `verify-full` secure connection type. `sslrootcert={primary cert}` | The path to the primary cluster's CA certificate on the standby cluster. -## Capabilities - -{{site.data.alerts.callout_info}} -Cockroach Labs does not recommend changing the default capabilities of created virtual clusters. -{{site.data.alerts.end}} - -_Capabilities_ control what a virtual cluster can do. When you start a replication stream, you can specify a virtual cluster with `LIKE` to ensure other virtual clusters on the standby cluster will work in the same way. `LIKE` will refer to a virtual cluster on the CockroachDB cluster you're running the statement from. - -## Examples +## Example ### Start a replication stream @@ -92,19 +76,6 @@ CREATE VIRTUAL CLUSTER main FROM REPLICATION OF main ON 'postgresql://{connectio This will create a `main` virtual cluster in the standby cluster. The standby's system virtual cluster will connect to the primary cluster to initiate the replication stream job. For detail on the replication stream, refer to the [Responses]({% link {{ page.version.version }}/show-virtual-cluster.md %}#responses) for `SHOW VIRTUAL CLUSTER`. -### Specify a retention window for a replication stream - -When you initiate a replication stream, you can specify a retention window to protect data from [garbage collection]({% link {{ page.version.version }}/architecture/storage-layer.md %}#garbage-collection). The retention window controls how far in the past you can [cut over]({% link {{ page.version.version }}/cutover-replication.md %}) to: - -{% include_cached copy-clipboard.html %} -~~~ sql -CREATE VIRTUAL CLUSTER main FROM REPLICATION OF main ON 'postgresql://{connection string to primary}' WITH RETENTION '36h'; -~~~ - -This will initiate a replication stream from the primary cluster into the standby cluster's new `main` virtual cluster. The `RETENTION` option allows you to specify a timestamp in the past for cutover to the standby cluster. After cutover, the standby `main` virtual cluster will be transactionally consistent to any timestamp within that retention window. - -{% include {{ page.version.version }}/physical-replication/retention.md %} - ## See also - [`DROP VIRTUAL CLUSTER`]({% link {{ page.version.version }}/drop-virtual-cluster.md %}) diff --git a/src/current/v24.3/alter-virtual-cluster.md b/src/current/v24.3/alter-virtual-cluster.md index faafc6d8e50..bd579b64b32 100644 --- a/src/current/v24.3/alter-virtual-cluster.md +++ b/src/current/v24.3/alter-virtual-cluster.md @@ -41,8 +41,6 @@ Parameter | Description `PAUSE REPLICATION` | Pause the replication stream. `RESUME REPLICATION` | Resume the replication stream. `COMPLETE REPLICATION TO` | Set the time to complete the replication. Use:
-`SET REPLICATION RETENTION = duration` | Change the [duration]({% link {{ page.version.version }}/interval.md %}) of the retention window that will control how far in the past you can [fail over]({% link {{ page.version.version }}/failover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} -`SET REPLICATION EXPIRATION WINDOW = duration` | Override the default producer job's expiration window of 24 hours. The producer job expiration window determines how long the producer job will continue to run without a heartbeat from the consumer job. For more details, refer to the [Technical Overview]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}). `START REPLICATION OF virtual_cluster_spec ON physical_cluster` | Reset a virtual cluster to the time when the virtual cluster on the promoted standby diverged from it. To reuse as much of the existing data on the original primary cluster as possible, you can run this statement as part of the [failback]({% link {{ page.version.version }}/failover-replication.md %}#failback) process. This command fails if the virtual cluster was not originally replicated from the original primary cluster. Refer to [Options](#options) for details on how you can configure a PCR stream initiated as a failback. `START SERVICE SHARED` | Start a virtual cluster so it is ready to accept SQL connections after failover. `RENAME TO virtual_cluster_spec` | Rename a virtual cluster. @@ -58,9 +56,7 @@ You can use the following options with `ALTER VIRTUAL CLUSTER {vc} START REPLICA Option | Value | Description -------+-------+------------ -`EXPIRATION WINDOW` | Duration | Override the default producer job's expiration window of 24 hours. The producer job expiration window determines how long the producer job will continue to run without a heartbeat from the consumer job. For more details, refer to the [Technical Overview]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}). New in v24.3: `READ VIRTUAL CLUSTER` | N/A | ([**Preview**]({% link {{ page.version.version }}/cockroachdb-feature-availability.md %}#features-in-preview)) Configure the PCR stream to allow reads from the standby cluster.
**Note:** This only allows for reads on the standby's virtual cluster. You cannot perform writes or schema changes to user tables while connected to the standby virtual cluster. For more details, refer to [Start the failback process](#start-the-failback-process). -`RETENTION` | Duration | Change the [duration]({% link {{ page.version.version }}/interval.md %}) of the retention window that will control how far in the past you can [fail over]({% link {{ page.version.version }}/failover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} ## Examples @@ -99,17 +95,6 @@ The original primary virtual cluster may be almost up to date with the promoted If you started the original PCR stream on an existing cluster without virtualization enabled, refer to the [Fail back after PCR from an existing cluster]({% link {{ page.version.version }}/failover-replication.md %}) section for instructions. {{site.data.alerts.end}} -### Set a retention window - -You can change the retention window to protect data from [garbage collection]({% link {{ page.version.version }}/architecture/storage-layer.md %}#garbage-collection). The retention window controls how far in the past you can [fail over]({% link {{ page.version.version }}/failover-replication.md %}) to: - -{% include_cached copy-clipboard.html %} -~~~ sql -ALTER VIRTUAL CLUSTER main SET REPLICATION RETENTION = '24h'; -~~~ - -{% include {{ page.version.version }}/physical-replication/retention.md %} - ### Start a virtual cluster When a virtual cluster is [`ready`]({% link {{ page.version.version }}/show-virtual-cluster.md %}#responses) after initiating the failover process, you must start the service so that the virtual cluster is ready to accept SQL connections: diff --git a/src/current/v24.3/create-virtual-cluster.md b/src/current/v24.3/create-virtual-cluster.md index 74087adb71a..87b2178c750 100644 --- a/src/current/v24.3/create-virtual-cluster.md +++ b/src/current/v24.3/create-virtual-cluster.md @@ -52,7 +52,6 @@ Parameter | Description Option | Description -------+------------- New in v24.3: `READ VIRTUAL CLUSTER` | ([**Preview**]({% link {{ page.version.version }}/cockroachdb-feature-availability.md %}#features-in-preview)) Create a [read-only virtual cluster]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}#start-up-sequence-with-read-on-standby) on the standby cluster, which allows reads of the standby's replicating virtual cluster. For an example, refer to [Start a PCR stream with read from standby](#start-a-pcr-stream-with-read-from-standby). -`RETENTION` | Configure a [retention window]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}#failover-and-promotion-process) that will control how far in the past you can [fail over]({% link {{ page.version.version }}/failover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} ## Connection string @@ -95,19 +94,6 @@ CREATE VIRTUAL CLUSTER main FROM REPLICATION OF main ON 'postgresql://{connectio This will create a `main` virtual cluster in the standby cluster. The standby's system virtual cluster will connect to the primary cluster to initiate the PCR job. For details on the PCR stream, refer to the [Responses]({% link {{ page.version.version }}/show-virtual-cluster.md %}#responses) for `SHOW VIRTUAL CLUSTER`. -### Specify a retention window for a PCR stream - -When you initiate a PCR stream, you can specify a retention window to protect data from [garbage collection]({% link {{ page.version.version }}/architecture/storage-layer.md %}#garbage-collection). The retention window controls how far in the past you can [fail over]({% link {{ page.version.version }}/failover-replication.md %}) to: - -{% include_cached copy-clipboard.html %} -~~~ sql -CREATE VIRTUAL CLUSTER main FROM REPLICATION OF main ON 'postgresql://{connection string to primary}' WITH RETENTION '36h'; -~~~ - -This will initiate a PCR stream from the primary cluster into the standby cluster's new `main` virtual cluster. The `RETENTION` option allows you to specify a timestamp in the past for failover to the standby cluster. After failover, the standby `main` virtual cluster will be transactionally consistent to any timestamp within that retention window. - -{% include {{ page.version.version }}/physical-replication/retention.md %} - ### Start a PCR stream with read from standby {{site.data.alerts.callout_info}} diff --git a/src/current/v25.1/alter-virtual-cluster.md b/src/current/v25.1/alter-virtual-cluster.md index 083841922fb..a6737917a51 100644 --- a/src/current/v25.1/alter-virtual-cluster.md +++ b/src/current/v25.1/alter-virtual-cluster.md @@ -41,8 +41,6 @@ Parameter | Description `PAUSE REPLICATION` | Pause the replication stream. `RESUME REPLICATION` | Resume the replication stream. `COMPLETE REPLICATION TO` | Set the time to complete the replication. Use:
-`SET REPLICATION RETENTION = duration` | Change the [duration]({% link {{ page.version.version }}/interval.md %}) of the retention window that will control how far in the past you can [fail over]({% link {{ page.version.version }}/failover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} -`SET REPLICATION EXPIRATION WINDOW = duration` | Override the default producer job's expiration window of 24 hours. The producer job expiration window determines how long the producer job will continue to run without a heartbeat from the consumer job. For more details, refer to the [Technical Overview]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}). `START REPLICATION OF virtual_cluster_spec ON physical_cluster` | Reset a virtual cluster to the time when the virtual cluster on the promoted standby diverged from it. To reuse as much of the existing data on the original primary cluster as possible, you can run this statement as part of the [failback]({% link {{ page.version.version }}/failover-replication.md %}#failback) process. This command fails if the virtual cluster was not originally replicated from the original primary cluster. Refer to [Options](#options) for details on how you can configure a PCR stream initiated as a failback. `START SERVICE SHARED` | Start a virtual cluster so it is ready to accept SQL connections after failover. `RENAME TO virtual_cluster_spec` | Rename a virtual cluster. @@ -58,9 +56,7 @@ You can use the following options with `ALTER VIRTUAL CLUSTER {vc} START REPLICA Option | Value | Description -------+-------+------------ -`EXPIRATION WINDOW` | Duration | Override the default producer job's expiration window of 24 hours. The producer job expiration window determines how long the producer job will continue to run without a heartbeat from the consumer job. For more details, refer to the [Technical Overview]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}). `READ VIRTUAL CLUSTER` | N/A | ([**Preview**]({% link {{ page.version.version }}/cockroachdb-feature-availability.md %}#features-in-preview)) Configure the PCR stream to allow reads from the standby cluster.
**Note:** This only allows for reads on the standby's virtual cluster. You cannot perform writes or schema changes to user tables while connected to the standby virtual cluster. For more details, refer to [Start the failback process](#start-the-failback-process). -`RETENTION` | Duration | Change the [duration]({% link {{ page.version.version }}/interval.md %}) of the retention window that will control how far in the past you can [fail over]({% link {{ page.version.version }}/failover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} ## Examples @@ -99,17 +95,6 @@ The original primary virtual cluster may be almost up to date with the promoted If you started the original PCR stream on an existing cluster without virtualization enabled, refer to the [Fail back after PCR from an existing cluster]({% link {{ page.version.version }}/failover-replication.md %}) section for instructions. {{site.data.alerts.end}} -### Set a retention window - -You can change the retention window to protect data from [garbage collection]({% link {{ page.version.version }}/architecture/storage-layer.md %}#garbage-collection). The retention window controls how far in the past you can [fail over]({% link {{ page.version.version }}/failover-replication.md %}) to: - -{% include_cached copy-clipboard.html %} -~~~ sql -ALTER VIRTUAL CLUSTER main SET REPLICATION RETENTION = '24h'; -~~~ - -{% include {{ page.version.version }}/physical-replication/retention.md %} - ### Start a virtual cluster When a virtual cluster is [`ready`]({% link {{ page.version.version }}/show-virtual-cluster.md %}#responses) after initiating the failover process, you must start the service so that the virtual cluster is ready to accept SQL connections: diff --git a/src/current/v25.1/create-virtual-cluster.md b/src/current/v25.1/create-virtual-cluster.md index 76c96b93dc3..183f02d732d 100644 --- a/src/current/v25.1/create-virtual-cluster.md +++ b/src/current/v25.1/create-virtual-cluster.md @@ -52,7 +52,6 @@ Parameter | Description Option | Description -------+------------- `READ VIRTUAL CLUSTER` | ([**Preview**]({% link {{ page.version.version }}/cockroachdb-feature-availability.md %}#features-in-preview)) Create a [read-only virtual cluster]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}#start-up-sequence-with-read-on-standby) on the standby cluster, which allows reads of the standby's replicating virtual cluster. For an example, refer to [Start a PCR stream with read from standby](#start-a-pcr-stream-with-read-from-standby). -`RETENTION` | Configure a [retention window]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}#failover-and-promotion-process) that will control how far in the past you can [fail over]({% link {{ page.version.version }}/failover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} ## Connection string @@ -95,19 +94,6 @@ CREATE VIRTUAL CLUSTER main FROM REPLICATION OF main ON 'postgresql://{connectio This will create a `main` virtual cluster in the standby cluster. The standby's system virtual cluster will connect to the primary cluster to initiate the PCR job. For details on the PCR stream, refer to the [Responses]({% link {{ page.version.version }}/show-virtual-cluster.md %}#responses) for `SHOW VIRTUAL CLUSTER`. -### Specify a retention window for a PCR stream - -When you initiate a PCR stream, you can specify a retention window to protect data from [garbage collection]({% link {{ page.version.version }}/architecture/storage-layer.md %}#garbage-collection). The retention window controls how far in the past you can [fail over]({% link {{ page.version.version }}/failover-replication.md %}) to: - -{% include_cached copy-clipboard.html %} -~~~ sql -CREATE VIRTUAL CLUSTER main FROM REPLICATION OF main ON 'postgresql://{connection string to primary}' WITH RETENTION '36h'; -~~~ - -This will initiate a PCR stream from the primary cluster into the standby cluster's new `main` virtual cluster. The `RETENTION` option allows you to specify a timestamp in the past for failover to the standby cluster. After failover, the standby `main` virtual cluster will be transactionally consistent to any timestamp within that retention window. - -{% include {{ page.version.version }}/physical-replication/retention.md %} - ### Start a PCR stream with read from standby {{site.data.alerts.callout_info}} diff --git a/src/current/v25.2/alter-virtual-cluster.md b/src/current/v25.2/alter-virtual-cluster.md index 083841922fb..e7c5e12e45f 100644 --- a/src/current/v25.2/alter-virtual-cluster.md +++ b/src/current/v25.2/alter-virtual-cluster.md @@ -15,12 +15,11 @@ The `ALTER VIRTUAL CLUSTER` statement initiates a [_failover_](#start-the-failov ## Required privileges -`ALTER VIRTUAL CLUSTER` requires one of the following privileges: +{% include_cached new-in.html version="v25.2" %} To run the `ALTER VIRTUAL CLUSTER` statement from the standby cluster, users require the `REPLICATIONDEST` system [privilege]({% link {{ page.version.version }}/security-reference/authorization.md %}) **and** the `MANAGEVIRTUALCLUSTER` privilege. -- The `admin` role. -- The `MANAGEVIRTUALCLUSTER` [system privilege]({% link {{ page.version.version }}/security-reference/authorization.md %}#privileges) allows the user to run all the related `VIRTUAL CLUSTER` SQL statements for PCR. +{% include_cached new-in.html version="v25.2" %} The `ALTER VIRTUAL CLUSTER ... SET REPLICATION SOURCE` statement requires the `REPLICATIONSOURCE` system privilege and the `MANAGEVIRTUALCLUSTER` privilege. -Use the [`GRANT SYSTEM`]({% link {{ page.version.version }}/grant.md %}) statement: +Use the [`GRANT SYSTEM`]({% link {{ page.version.version }}/grant.md %}) statement to grant the necessary privileges, for example: {% include_cached copy-clipboard.html %} ~~~ sql @@ -42,7 +41,7 @@ Parameter | Description `RESUME REPLICATION` | Resume the replication stream. `COMPLETE REPLICATION TO` | Set the time to complete the replication. Use:
`SET REPLICATION RETENTION = duration` | Change the [duration]({% link {{ page.version.version }}/interval.md %}) of the retention window that will control how far in the past you can [fail over]({% link {{ page.version.version }}/failover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} -`SET REPLICATION EXPIRATION WINDOW = duration` | Override the default producer job's expiration window of 24 hours. The producer job expiration window determines how long the producer job will continue to run without a heartbeat from the consumer job. For more details, refer to the [Technical Overview]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}). +New in v25.2: `SET REPLICATION SOURCE EXPIRATION WINDOW = duration` | Override the default producer job's expiration window of 24 hours from the primary cluster. The producer job expiration window determines how long the producer job will continue to run without a heartbeat from the consumer job. For more details, refer to the [Technical Overview]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}). `START REPLICATION OF virtual_cluster_spec ON physical_cluster` | Reset a virtual cluster to the time when the virtual cluster on the promoted standby diverged from it. To reuse as much of the existing data on the original primary cluster as possible, you can run this statement as part of the [failback]({% link {{ page.version.version }}/failover-replication.md %}#failback) process. This command fails if the virtual cluster was not originally replicated from the original primary cluster. Refer to [Options](#options) for details on how you can configure a PCR stream initiated as a failback. `START SERVICE SHARED` | Start a virtual cluster so it is ready to accept SQL connections after failover. `RENAME TO virtual_cluster_spec` | Rename a virtual cluster. @@ -58,7 +57,7 @@ You can use the following options with `ALTER VIRTUAL CLUSTER {vc} START REPLICA Option | Value | Description -------+-------+------------ -`EXPIRATION WINDOW` | Duration | Override the default producer job's expiration window of 24 hours. The producer job expiration window determines how long the producer job will continue to run without a heartbeat from the consumer job. For more details, refer to the [Technical Overview]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}). +`EXPIRATION WINDOW` | Duration | Override the default producer job's expiration window of 24 hours from the primary cluster. The producer job expiration window determines how long the producer job will continue to run without a heartbeat from the consumer job. For more details, refer to the [Technical Overview]({% link {{ page.version.version }}/physical-cluster-replication-technical-overview.md %}). `READ VIRTUAL CLUSTER` | N/A | ([**Preview**]({% link {{ page.version.version }}/cockroachdb-feature-availability.md %}#features-in-preview)) Configure the PCR stream to allow reads from the standby cluster.
**Note:** This only allows for reads on the standby's virtual cluster. You cannot perform writes or schema changes to user tables while connected to the standby virtual cluster. For more details, refer to [Start the failback process](#start-the-failback-process). `RETENTION` | Duration | Change the [duration]({% link {{ page.version.version }}/interval.md %}) of the retention window that will control how far in the past you can [fail over]({% link {{ page.version.version }}/failover-replication.md %}) to.

{% include {{ page.version.version }}/physical-replication/retention.md %} @@ -66,7 +65,7 @@ Option | Value | Description ### Start the failover process -To start the [failover]({% link {{ page.version.version }}/failover-replication.md %}#failover) process, use `COMPLETE REPLICATION` and provide the timestamp to restore as of: +To start the [failover]({% link {{ page.version.version }}/failover-replication.md %}#failover) process from the standby cluster, use `COMPLETE REPLICATION` and provide the timestamp to restore as of: {% include_cached copy-clipboard.html %} ~~~ sql @@ -112,7 +111,7 @@ ALTER VIRTUAL CLUSTER main SET REPLICATION RETENTION = '24h'; ### Start a virtual cluster -When a virtual cluster is [`ready`]({% link {{ page.version.version }}/show-virtual-cluster.md %}#responses) after initiating the failover process, you must start the service so that the virtual cluster is ready to accept SQL connections: +When a virtual cluster is [`ready`]({% link {{ page.version.version }}/show-virtual-cluster.md %}#responses) after initiating the failover process, you must start the service so that the virtual cluster is ready to accept SQL connections. On the standby cluster, run: {% include_cached copy-clipboard.html %} ~~~ sql diff --git a/src/current/v25.2/create-virtual-cluster.md b/src/current/v25.2/create-virtual-cluster.md index 76c96b93dc3..2551f942efb 100644 --- a/src/current/v25.2/create-virtual-cluster.md +++ b/src/current/v25.2/create-virtual-cluster.md @@ -19,12 +19,12 @@ Physical cluster replication is only supported in CockroachDB {{ site.data.produ ## Required privileges -`CREATE VIRTUAL CLUSTER` requires one of the following privileges: +{% include_cached new-in.html version="v25.2" %} The following [privileges]({% link {{ page.version.version }}/security-reference/authorization.md %}) are required to start a PCR stream with `CREATE VIRTUAL CLUSTER`: -- The `admin` role. -- The `MANAGEVIRTUALCLUSTER` [system privilege]({% link {{ page.version.version }}/security-reference/authorization.md %}#privileges) allows the user to run all the related `VIRTUAL CLUSTER` SQL statements for PCR. +- The `REPLICATIONDEST` and `MANAGEVIRTUALCLUSTER` system privileges: The user starting the PCR stream from the standby cluster. +- The `REPLICATIONSOURCE` system privilege: The user specified in the connection string for the primary cluster. -Use the [`GRANT SYSTEM`]({% link {{ page.version.version }}/grant.md %}) statement: +Use the [`GRANT SYSTEM`]({% link {{ page.version.version }}/grant.md %}) statement to grant the necessary privileges to users, for example: {% include_cached copy-clipboard.html %} ~~~ sql diff --git a/src/current/v25.2/drop-virtual-cluster.md b/src/current/v25.2/drop-virtual-cluster.md index 572d25d1ca3..5d2e2b19ccc 100644 --- a/src/current/v25.2/drop-virtual-cluster.md +++ b/src/current/v25.2/drop-virtual-cluster.md @@ -24,7 +24,7 @@ The `DROP VIRTUAL CLUSTER` statement will delete all data related to the specifi `DROP VIRTUAL CLUSTER` requires one of the following privileges: - The `admin` role. -- The `MANAGEVIRTUALCLUSTER` [system privilege]({% link {{ page.version.version }}/security-reference/authorization.md %}#privileges) allows the user to run all the related `VIRTUAL CLUSTER` SQL statements for PCR. +- The `MANAGEVIRTUALCLUSTER` [system privilege]({% link {{ page.version.version }}/security-reference/authorization.md %}#privileges). Use the [`GRANT SYSTEM`]({% link {{ page.version.version }}/grant.md %}) statement: diff --git a/src/current/v25.2/set-up-physical-cluster-replication.md b/src/current/v25.2/set-up-physical-cluster-replication.md index 060d9be751d..5e2c1b44a39 100644 --- a/src/current/v25.2/set-up-physical-cluster-replication.md +++ b/src/current/v25.2/set-up-physical-cluster-replication.md @@ -105,7 +105,7 @@ Connect to your primary cluster's system virtual cluster using [`cockroach sql`] ### Create a replication user and password -The standby cluster connects to the primary cluster's system virtual cluster using an identity with the `REPLICATION` privilege. Connect to the primary cluster's system virtual cluster and create a user with a password: +The standby cluster connects to the primary cluster's system virtual cluster using an identity with the `REPLICATIONSOURCE` privilege. Connect to the primary cluster's system virtual cluster and create a user with a password: 1. From the primary's system virtual cluster SQL shell, create a user and password: @@ -114,14 +114,14 @@ The standby cluster connects to the primary cluster's system virtual cluster usi CREATE USER {your username} WITH PASSWORD '{your password}'; ~~~ -1. Grant the [`REPLICATION` system privilege]({% link {{ page.version.version }}/security-reference/authorization.md %}#supported-privileges) to your user: +1. Grant the [`REPLICATIONSOURCE` privilege]({% link {{ page.version.version }}/security-reference/authorization.md %}#supported-privileges) to your user: {% include_cached copy-clipboard.html %} ~~~ sql - GRANT SYSTEM REPLICATION TO {your username}; + GRANT SYSTEM REPLICATIONSOURCE TO {your username}; ~~~ - If you need to change the password later, refer to [`ALTER USER`]({% link {{ page.version.version }}/alter-user.md %}). +If you need to change the password later, refer to [`ALTER USER`]({% link {{ page.version.version }}/alter-user.md %}). ### Connect to the primary virtual cluster (optional) @@ -200,17 +200,6 @@ Connect to your standby cluster's system virtual cluster using [`cockroach sql`] --certs-dir "certs" ~~~ -1. Add your cluster organization and [{{ site.data.products.enterprise }} license]({% link {{ page.version.version }}/licensing-faqs.md %}#types-of-licenses) to the cluster: - - {% include_cached copy-clipboard.html %} - ~~~ sql - SET CLUSTER SETTING cluster.organization = 'your organization'; - ~~~ - {% include_cached copy-clipboard.html %} - ~~~ sql - SET CLUSTER SETTING enterprise.license = 'your enterprise license'; - ~~~ - 1. Set the `kv.rangefeed.enabled` cluster setting to `true`. The replication job connects to a long-lived request, a _rangefeed_, which pushes changes as they happen: {% include_cached copy-clipboard.html %} @@ -236,7 +225,7 @@ Connect to your standby cluster's system virtual cluster using [`cockroach sql`] ### Create a user for the standby cluster -If you would like to access the [DB Console]({% link {{ page.version.version }}/ui-overview.md %}) to observe your replication, you will need to create a user: +Create a user to run the PCR stream and access the [DB Console]({% link {{ page.version.version }}/ui-overview.md %}) to observe the job: 1. Create a user: @@ -249,7 +238,7 @@ If you would like to access the [DB Console]({% link {{ page.version.version }}/ {% include_cached copy-clipboard.html %} ~~~ sql - GRANT admin TO {your username}; + GRANT SYSTEM REPLICATIONDEST, MANAGEVIRTUALCLUSTER TO {your username}; ~~~ Open the DB Console in your web browser: `https://{node IP or hostname}:8080/`, where you will be prompted for these credentials. Refer to [Physical Cluster Replication Monitoring]({% link {{ page.version.version }}/physical-cluster-replication-monitoring.md %}) for more detail on tracking relevant metrics for your replication stream.