Skip to content

Commit e0439f3

Browse files
craig[bot]yuzefovichkev-cao
committed
148546: roachtest/pg_regress: accept recent diffs r=yuzefovich a=yuzefovich We now disable `create_table_with_schema_locked` (the default has recently changed to `true`). Fixes: #148331. Release note: None 150199: backup: increase max duration for restore fast fail tests r=msbutler a=kev-cao Under enough load, the restore fast fail test is not able to complete restores in time before `MaxDuration` is hit, which causes test flakes because the restore quits early. This increases the duration in tests to reduce flakiness. Fixes: #150197 Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Kevin Cao <[email protected]>
3 parents bea2c36 + ad37256 + 45b8c49 commit e0439f3

19 files changed

+809
-1037
lines changed

pkg/backup/restore_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ func TestRestoreRetryFastFails(t *testing.T) {
105105
// Max duration needs to be long enough such that the restore job
106106
// runtime does not exceed the max duration of the retry policy, or
107107
// else very few attempts will be made.
108-
maxDuration := 100 * time.Millisecond
108+
maxDuration := 500 * time.Millisecond
109109
if skip.Stress() {
110110
// Under stress, the restore will take longer to complete, so we need to
111111
// increase max duration accordingly.
112-
maxDuration = time.Second
112+
maxDuration = 1500 * time.Millisecond
113113
}
114114
const numAccounts = 10
115115

pkg/cmd/roachtest/testdata/pg_regress/alter_table.diffs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3816,10 +3816,10 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/alter_table.out -
38163816
create temp view v2 as select * from v1;
38173817
create or replace temp view v1 with (security_barrier = true)
38183818
as select * from t1;
3819-
+ERROR: at or near "with": syntax error
3819+
+ERROR: at or near "security_barrier": syntax error
38203820
+DETAIL: source SQL:
38213821
+create or replace temp view v1 with (security_barrier = true)
3822-
+ ^
3822+
+ ^
38233823
+HINT: try \h CREATE
38243824
create temp table log (q1 int8, q2 int8);
38253825
create rule v1_upd_rule as on update to v1
@@ -4212,10 +4212,10 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/alter_table.out -
42124212
+ERROR: relation "my_locks" does not exist
42134213
alter view my_locks set (autovacuum_enabled = false);
42144214
-ERROR: unrecognized parameter "autovacuum_enabled"
4215-
+ERROR: at or near "(": syntax error
4215+
+ERROR: at or near "autovacuum_enabled": syntax error
42164216
+DETAIL: source SQL:
42174217
+alter view my_locks set (autovacuum_enabled = false)
4218-
+ ^
4218+
+ ^
42194219
+HINT: try \h ALTER VIEW
42204220
alter table my_locks reset (autovacuum_enabled);
42214221
+ERROR: relation "my_locks" does not exist
@@ -4227,10 +4227,10 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/alter_table.out -
42274227
+HINT: try \h ALTER VIEW
42284228
begin;
42294229
alter view my_locks set (security_barrier=off);
4230-
+ERROR: at or near "(": syntax error
4230+
+ERROR: at or near "security_barrier": syntax error
42314231
+DETAIL: source SQL:
42324232
+alter view my_locks set (security_barrier=off)
4233-
+ ^
4233+
+ ^
42344234
+HINT: try \h ALTER VIEW
42354235
select * from my_locks order by 1;
42364236
- relname | max_lockmode

pkg/cmd/roachtest/testdata/pg_regress/create_procedure.diffs

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/create_procedure.
1616
HINT: To call a function, use SELECT.
1717
CREATE FUNCTION cp_testfunc1(a int) RETURNS int LANGUAGE SQL AS $$ SELECT a $$;
1818
CREATE TABLE cp_test (a int, b text);
19-
@@ -16,47 +12,86 @@
19+
@@ -16,47 +12,91 @@
2020
INSERT INTO cp_test VALUES (1, x);
2121
$$;
2222
\df ptest1
@@ -51,9 +51,14 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/create_procedure.
5151
- INSERT INTO cp_test VALUES (1, x); +
5252
- $procedure$ +
5353
-
54-
+ pg_get_functiondef
55-
+------------------------------------------------
56-
+ INSERT INTO root.public.cp_test VALUES (1, x);
54+
+ pg_get_functiondef
55+
+--------------------------------------------------------
56+
+ CREATE PROCEDURE public.ptest1(x STRING) +
57+
+ LANGUAGE SQL +
58+
+ SECURITY INVOKER +
59+
+ AS $$ +
60+
+ INSERT INTO root.public.cp_test VALUES (1, x);+
61+
+ $$
5762
(1 row)
5863

5964
-- show only normal functions
@@ -132,7 +137,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/create_procedure.
132137
SELECT * FROM cp_test ORDER BY b COLLATE "C";
133138
a | b
134139
---+-------
135-
@@ -71,34 +106,47 @@
140+
@@ -71,34 +111,47 @@
136141
BEGIN ATOMIC
137142
INSERT INTO cp_test VALUES (1, x);
138143
END;
@@ -199,7 +204,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/create_procedure.
199204

200205
-- utility functions currently not supported here
201206
CREATE PROCEDURE ptestx()
202-
@@ -106,13 +154,27 @@
207+
@@ -106,13 +159,27 @@
203208
BEGIN ATOMIC
204209
CREATE TABLE x (a int);
205210
END;
@@ -228,7 +233,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/create_procedure.
228233
-- nested CALL
229234
TRUNCATE cp_test;
230235
CREATE PROCEDURE ptest3(y text)
231-
@@ -122,6 +184,9 @@
236+
@@ -122,6 +189,9 @@
232237
CALL ptest1($1);
233238
$$;
234239
CALL ptest3('b');
@@ -238,15 +243,15 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/create_procedure.
238243
SELECT * FROM cp_test;
239244
a | b
240245
---+---
241-
@@ -147,7 +212,6 @@
246+
@@ -147,7 +217,6 @@
242247
CALL ptest4a(a, b); -- error, not supported
243248
$$;
244249
ERROR: calling procedures with output arguments is not supported in SQL functions
245250
-CONTEXT: SQL function "ptest4b"
246251
DROP PROCEDURE ptest4a;
247252
-- named and default parameters
248253
CREATE OR REPLACE PROCEDURE ptest5(a int, b text, c int default 100)
249-
@@ -158,9 +222,23 @@
254+
@@ -158,9 +227,23 @@
250255
$$;
251256
TRUNCATE cp_test;
252257
CALL ptest5(10, 'Hello', 20);
@@ -270,7 +275,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/create_procedure.
270275
SELECT * FROM cp_test;
271276
a | b
272277
-----+-------
273-
@@ -168,11 +246,7 @@
278+
@@ -168,11 +251,7 @@
274279
20 | Hello
275280
10 | Hello
276281
100 | Hello
@@ -283,7 +288,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/create_procedure.
283288

284289
-- polymorphic types
285290
CREATE PROCEDURE ptest6(a int, b anyelement)
286-
@@ -181,6 +255,9 @@
291+
@@ -181,6 +260,9 @@
287292
SELECT NULL::int;
288293
$$;
289294
CALL ptest6(1, 2);
@@ -293,7 +298,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/create_procedure.
293298
-- collation assignment
294299
CREATE PROCEDURE ptest7(a text, b text)
295300
LANGUAGE SQL
296-
@@ -188,28 +265,47 @@
301+
@@ -188,28 +270,47 @@
297302
SELECT a = b;
298303
$$;
299304
CALL ptest7(least('a', 'b'), 'a');
@@ -356,7 +361,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/create_procedure.
356361
-- OUT parameters
357362
CREATE PROCEDURE ptest9(OUT a int)
358363
LANGUAGE SQL
359-
@@ -226,17 +322,10 @@
364+
@@ -226,17 +327,10 @@
360365

361366
-- you can write an expression, but it's not evaluated
362367
CALL ptest9(1/0); -- no error
@@ -376,7 +381,7 @@ diff -U3 --label=/mnt/data1/postgres/src/test/regress/expected/create_procedure.
376381
-- check named-parameter matching
377382
CREATE PROCEDURE ptest10(OUT a int, IN b int, IN c int)
378383
LANGUAGE SQL AS $$ SELECT b - c $$;
379-
@@ -247,137 +336,222 @@
384+
@@ -247,137 +341,222 @@
380385
(1 row)
381386

382387
CALL ptest10(a => null, b => 8, c => 2);

0 commit comments

Comments
 (0)