cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.05k stars 3.8k forks source link

roachtest: schemachange/mixed-versions failed [use REFCURSOR prior to 23.2] #132815

Open cockroach-teamcity opened 6 days ago

cockroach-teamcity commented 6 days ago

roachtest.schemachange/mixed-versions failed with artifacts on release-23.2.13-rc @ f00c152761838e05049d293198840b12605b545b:

(mixedversion.go:710).Run: mixed-version test failure while running step 13 (run "run schemachange workload and validation in mixed version"): full command output in run_062439.553147651_n4_COCKROACHRANDOMSEED7.log: COMMAND_PROBLEM: exit status 1
test artifacts and logs in: /artifacts/schemachange/mixed-versions/run_1

Parameters:

See: roachtest README

See: How To Investigate (internal)

See: Grafana

Same failure on other branches

- #131335 roachtest: schemachange/mixed-versions failed [C-test-failure O-roachtest O-robot P-2 T-sql-foundations branch-release-24.1] - #131162 roachtest: schemachange/mixed-versions failed [B-runtime-assertions-enabled C-test-failure O-roachtest O-robot T-sql-foundations branch-master] - #130545 roachtest: schemachange/mixed-versions failed [don't use refcursor in mixed version state] [C-test-failure O-roachtest O-robot P-2 T-sql-foundations branch-release-23.2] - #130278 roachtest: schemachange/mixed-versions failed [computed column cannot reference a foreign key] [C-test-failure O-roachtest O-robot P-2 T-sql-foundations branch-release-24.2] - #129395 roachtest: schemachange/mixed-versions failed [index contains stored column "" with unknown ID 0] [C-test-failure O-roachtest O-robot P-2 T-sql-foundations branch-master]

/cc @cockroachdb/sql-foundations

This test on roachdash | Improve this report!

Jira issue: CRDB-43286

spilchen commented 1 day ago

The failure is:

  |   "previousStatements": [
  |    "ALTER TABLE public.table2824 ALTER COLUMN \"col2824_2825\" SET DEFAULT 'G':::REFCURSOR"
  |   ]
  |  }
  | }
  |
  | stderr:I241017 06:24:40.004814 1 workload/cli/run.go:431  [-] 1  creating load generator...
  | I241017 06:24:40.136488 1 workload/cli/run.go:470  [-] 2  creating load generator... done (took 131.674146ms)
  | Error: ***UNEXPECTED ERROR; Received an unexpected execution error.: ERROR: refcursor not supported until version 23.2 (SQLSTATE 0A000)

We probably just need to add a version gate when attempting to set the default of a column to REFCURSOR

spilchen commented 22 hours ago

Similar to #128941, but this one is for ALTER COLUMN