Publication date: January 4, 2023
In CockroachDB v22.2.0 and v22.2.1, if a user-defined function (UDF) is created using any implicit record type which contains a column of user-defined
ENUM type as the function’s parameter type or return type, the CockroachDB instance will crash and refuse to start. For example:
CREATE TYPE e AS ENUM ('a', 'b'); CREATE TABLE t (a INT, b e); CREATE OR REPLACE FUNCTION f () RETURNS t AS $$ SELECT a, b FROM t ORDER BY a LIMIT 1; $$ LANGUAGE SQL; -- CockroachDB cluster crashes when this query is run
This is resolved in CockroachDB by PR #94106 which fixes infinite recursion during the type hydration for catalog descriptors.
The fix has been applied to maintenance releases of CockroachDB v22.2.2 and later.
This public issue is tracked by #93314.
Users of CockroachDB v22.2.0 and v22.2.1 should avoid creating a user-defined function (UDF) using any implicit record type that contains a field of user-defined
ENUM type as the function’s parameter type or return type.
Users of CockroachDB v22.2.0 and v22.2.1 are encouraged to upgrade to version v22.2.2 or later.
CockroachDB instances crash and refuse to start unless upgraded to v22.2.2 or a later version.
Please reach out to the support team if more information or assistance is needed.