You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This splits up the multiregion datadriven test so that each test has at
most 2 clusters in it. We've been seeing some stuck server shutdowns and
this should make them easier to troubleshoot.
Release note: none
Informs: #145079
RESTORE DATABASE d FROM LATEST IN 'nodelocal://1/database_backup/';
40
+
----
41
+
pq: detected a mismatch in regions between the restore cluster and the backup cluster, missing regions detected: us-east-1, us-west-1.
42
+
HINT: there are two ways you can resolve this issue: 1) update the cluster to which you're restoring to ensure that the regions present on the nodes' --locality flags match those present in the backup image, or 2) restore with the "skip_localities_check" option
43
+
44
+
exec-sql
45
+
RESTORE FROM LATEST IN 'nodelocal://1/full_cluster_backup/';
46
+
----
47
+
pq: detected a mismatch in regions between the restore cluster and the backup cluster, missing regions detected: us-east-1, us-west-1.
48
+
HINT: there are two ways you can resolve this issue: 1) update the cluster to which you're restoring to ensure that the regions present on the nodes' --locality flags match those present in the backup image, or 2) restore with the "skip_localities_check" option
49
+
50
+
exec-sql
51
+
RESTORE FROM LATEST IN 'nodelocal://1/full_cluster_backup/' WITH skip_localities_check;
52
+
----
53
+
54
+
exec-sql
55
+
INSERT INTO d.t VALUES (4);
56
+
----
57
+
58
+
exec-sql
59
+
SET enable_multiregion_placement_policy='true';
60
+
ALTER DATABASE d SURVIVE ZONE FAILURE;
61
+
ALTER DATABASE d PLACEMENT RESTRICTED;
62
+
ALTER DATABASE d SET PRIMARY REGION 'eu-central-1';
63
+
ALTER DATABASE d DROP REGION 'us-east-1';
64
+
ALTER DATABASE d DROP REGION 'us-west-1';
65
+
ALTER DATABASE d ADD REGION 'eu-north-1';
66
+
ALTER DATABASE d SET SECONDARY REGION 'eu-north-1';
67
+
----
68
+
69
+
exec-sql
70
+
RESTORE DATABASE d FROM LATEST IN 'nodelocal://1/database_backup/' WITH skip_localities_check, new_db_name='d_new';
71
+
----
72
+
73
+
exec-sql
74
+
INSERT INTO d_new.t VALUES (4);
75
+
----
76
+
77
+
exec-sql
78
+
SET enable_multiregion_placement_policy='true';
79
+
ALTER DATABASE d_new SURVIVE ZONE FAILURE;
80
+
ALTER DATABASE d PLACEMENT RESTRICTED;
81
+
ALTER DATABASE d_new SET PRIMARY REGION 'eu-central-1';
82
+
ALTER DATABASE d_new DROP REGION 'us-east-1';
83
+
ALTER DATABASE d_new DROP REGION 'us-west-1';
84
+
ALTER DATABASE d_new ADD REGION 'eu-north-1';
85
+
ALTER DATABASE d_new SET SECONDARY REGION 'eu-north-1';
RESTORE DATABASE d FROM LATEST IN 'nodelocal://1/database_backup/';
91
-
----
92
-
pq: detected a mismatch in regions between the restore cluster and the backup cluster, missing regions detected: us-east-1, us-west-1.
93
-
HINT: there are two ways you can resolve this issue: 1) update the cluster to which you're restoring to ensure that the regions present on the nodes' --locality flags match those present in the backup image, or 2) restore with the "skip_localities_check" option
94
-
95
-
exec-sql
96
-
RESTORE FROM LATEST IN 'nodelocal://1/full_cluster_backup/';
97
-
----
98
-
pq: detected a mismatch in regions between the restore cluster and the backup cluster, missing regions detected: us-east-1, us-west-1.
99
-
HINT: there are two ways you can resolve this issue: 1) update the cluster to which you're restoring to ensure that the regions present on the nodes' --locality flags match those present in the backup image, or 2) restore with the "skip_localities_check" option
100
-
101
-
exec-sql
102
-
RESTORE FROM LATEST IN 'nodelocal://1/full_cluster_backup/' WITH skip_localities_check;
103
-
----
104
-
105
-
exec-sql
106
-
INSERT INTO d.t VALUES (4);
107
-
----
108
-
109
-
exec-sql
110
-
SET enable_multiregion_placement_policy='true';
111
-
ALTER DATABASE d SURVIVE ZONE FAILURE;
112
-
ALTER DATABASE d PLACEMENT RESTRICTED;
113
-
ALTER DATABASE d SET PRIMARY REGION 'eu-central-1';
114
-
ALTER DATABASE d DROP SECONDARY REGION;
115
-
ALTER DATABASE d DROP REGION 'us-east-1';
116
-
ALTER DATABASE d DROP REGION 'us-west-1';
117
-
ALTER DATABASE d ADD REGION 'eu-north-1';
118
-
ALTER DATABASE d SET SECONDARY REGION 'eu-north-1';
119
-
----
120
-
121
-
exec-sql
122
-
RESTORE DATABASE d FROM LATEST IN 'nodelocal://1/database_backup/' WITH skip_localities_check, new_db_name='d_new';
123
-
----
124
-
125
-
exec-sql
126
-
INSERT INTO d_new.t VALUES (4);
127
-
----
128
-
129
-
exec-sql
130
-
SET enable_multiregion_placement_policy='true';
131
-
ALTER DATABASE d_new SURVIVE ZONE FAILURE;
132
-
ALTER DATABASE d PLACEMENT RESTRICTED;
133
-
ALTER DATABASE d_new SET PRIMARY REGION 'eu-central-1';
134
-
ALTER DATABASE d_new DROP SECONDARY REGION;
135
-
ALTER DATABASE d_new DROP REGION 'us-east-1';
136
-
ALTER DATABASE d_new DROP REGION 'us-west-1';
137
-
ALTER DATABASE d_new ADD REGION 'eu-north-1';
138
-
ALTER DATABASE d_new SET SECONDARY REGION 'eu-north-1';
# Create a database with no regions to check default primary regions.
@@ -186,7 +42,7 @@ exec-sql
186
42
RESTORE DATABASE no_region_db FROM LATEST IN 'nodelocal://1/no_region_database_backup/';
187
43
----
188
44
pq: region "non-existent-region" does not exist
189
-
HINT: valid regions: eu-central-1, eu-north-1
45
+
HINT: valid regions: eu-central-1
190
46
--
191
47
set the default PRIMARY REGION to a region that exists (see SHOW REGIONS FROM CLUSTER) then using SET CLUSTER SETTING sql.defaults.primary_region = 'region'
192
48
@@ -202,6 +58,7 @@ HINT: to change the default primary region, use SET CLUSTER SETTING sql.defaults
202
58
query-sql
203
59
SHOW DATABASES;
204
60
----
61
+
data root <nil> <nil> {} <nil>
205
62
defaultdb root <nil> <nil> {} <nil>
206
63
no_region_db root eu-central-1 {eu-central-1} zone
207
64
postgres root <nil> <nil> {} <nil>
@@ -238,6 +95,8 @@ NOTICE: setting the PRIMARY REGION as eu-north-1 on database defaultdb
238
95
HINT: to change the default primary region, use SET CLUSTER SETTING sql.defaults.primary_region = 'region' or use RESET CLUSTER SETTING sql.defaults.primary_region to disable this behavior
239
96
NOTICE: setting the PRIMARY REGION as eu-north-1 on database postgres
240
97
HINT: to change the default primary region, use SET CLUSTER SETTING sql.defaults.primary_region = 'region' or use RESET CLUSTER SETTING sql.defaults.primary_region to disable this behavior
98
+
NOTICE: setting the PRIMARY REGION as eu-north-1 on database data
99
+
HINT: to change the default primary region, use SET CLUSTER SETTING sql.defaults.primary_region = 'region' or use RESET CLUSTER SETTING sql.defaults.primary_region to disable this behavior
241
100
NOTICE: setting the PRIMARY REGION as eu-north-1 on database no_region_db
242
101
HINT: to change the default primary region, use SET CLUSTER SETTING sql.defaults.primary_region = 'region' or use RESET CLUSTER SETTING sql.defaults.primary_region to disable this behavior
243
102
NOTICE: setting the PRIMARY REGION as eu-north-1 on database no_region_db_2
@@ -246,6 +105,7 @@ HINT: to change the default primary region, use SET CLUSTER SETTING sql.defaults
246
105
query-sql
247
106
SHOW DATABASES;
248
107
----
108
+
data root eu-north-1 {eu-north-1} zone
249
109
defaultdb root eu-north-1 {eu-north-1} zone
250
110
no_region_db root eu-north-1 {eu-north-1} zone
251
111
no_region_db_2 root eu-north-1 {eu-north-1} zone
@@ -266,6 +126,7 @@ RESTORE DATABASE eu_central_db FROM LATEST IN 'nodelocal://1/eu_central_database
266
126
query-sql
267
127
SHOW DATABASES;
268
128
----
129
+
data root eu-north-1 {eu-north-1} zone
269
130
defaultdb root eu-north-1 {eu-north-1} zone
270
131
eu_central_db root eu-central-1 {eu-central-1} zone
0 commit comments