Skip to content

Commit

Permalink
Merge pull request cockroachdb#15715 from cockroachdb/known-limitatio…
Browse files Browse the repository at this point in the history
…ns-v22.2

Add new known limitations for 22.2 / Remove resolved limitations
  • Loading branch information
mikeCRL authored Dec 5, 2022
2 parents 0fee826 + 04c14ff commit 602af8f
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 33 deletions.
3 changes: 0 additions & 3 deletions _includes/v22.2/known-limitations/old-multi-col-stats.md

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions v22.2/cost-based-optimizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,6 @@ If you have an index named `FORCE_ZIGZAG` and use the hint `table@{FORCE_ZIGZAG}

## Known limitations

* {% include {{page.version.version}}/known-limitations/old-multi-col-stats.md %}
* {% include {{page.version.version}}/known-limitations/single-col-stats-deletion.md %}
* {% include {{page.version.version}}/known-limitations/stats-refresh-upgrade.md %}

## See also
Expand Down
111 changes: 89 additions & 22 deletions v22.2/known-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,86 @@ This page describes newly identified limitations in the CockroachDB {{page.relea

## New limitations

### Limitations for user-defined functions (UDFs)

#### Limitations on use of UDFs

[User-defined functions](user-defined-functions.html) are not currently supported in:

- Expressions (column, index, constraint) in tables.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/87699)

- Views.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/87699)

- Other user-defined functions.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/93049)

- [CDC transformations](https://www.cockroachlabs.com/docs/v22.2/cdc-transformations).

#### Limitations on expressions allowed within UDFs

The following are not currently allowed within the body of a [UDF](user-defined-functions.html):

- Subqueries in statements.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/87291)

- Mutation statements such as `INSERT`, `UPDATE`, `DELETE`, and `UPSERT`.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/87289)

- Expressions with `*` such as `SELECT *`.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/90080)

- Common table expressions (CTEs).

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/92961)

- References to other user-defined functions.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/93049)

### Default `range_stuck_threshold` value may cause unwanted changefeed restarts

The [cluster setting](cluster-settings.html) `kv.rangefeed.range_stuck_threshold` will automatically restart a rangefeed that appears to be stuck if it does not emit events for some time. Rangefeeds are used to stream per-range changefeed events. This setting was introduced in CockroachDB v22.1.7, disabled by default, but is enabled by default in v22.2.0, set to 1 minute.

This setting can erroneously trigger if the client fails to consume events for the configured duration, for example, in the case of an overloaded changefeed sink. Furthermore, this can cause the entire changefeed to fail and restart with error "context canceled", instead of only restarting the internal per-range rangefeed.

If this is seen to happen, the behavior can be disabled by setting `kv.rangefeed.range_stuck_threshold = '0s'`. A fix is under development, and will be included in an upcoming 22.2 patch release.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/92570)

### Limitations for DROP OWNED BY

#### DROP OWNED BY does not support drop functions

`DROP OWNED BY` drops all owned objects as well as any grants on objects not owned by the role.

In its current implementation, this statement does not drop functions. Users must drop their functions manually.

[Tracking GitHub Issue](https://github.com/cockroachdb/cockroach/issues/90476)

#### DROP OWNED BY is not supported where role has synthetic privileges

`DROP OWNED BY` drops all owned objects as well as any grants on objects not owned by the role.

If the [role](security-reference/authorization.html#roles) for which you are trying to `DROP OWNED BY` was granted a privilege using the [`GRANT SYSTEM ...`](grant.html#grant-global-privileges-on-the-entire-cluster) statement, the error shown below will be signalled. The workaround is to use [`SHOW SYSTEM GRANTS FOR {role}`](show-system-grants.html) and then use [`REVOKE SYSTEM ...`](revoke.html#revoke-global-privileges-on-the-entire-cluster) for each privilege in the result.

~~~
ERROR: cannot perform drop owned by if role has synthetic privileges; foo has entries in system.privileges
SQLSTATE: 0A000
HINT: perform REVOKE SYSTEM ... for the relevant privileges foo has in system.privileges
~~~

[Tracking GitHub Issue](https://github.com/cockroachdb/cockroach/issues/88149)

## Unresolved limitations

### Unsupported trigram syntax

The following PostgreSQL syntax and features are currently unsupported for [trigrams](trigram-indexes.html):
Expand Down Expand Up @@ -47,19 +127,6 @@ The `sql.guardrails.max_row_size_err` [cluster setting](cluster-settings.html) m

[Tracking GitHub Issue](https://github.com/cockroachdb/cockroach/issues/69540)

### Row-Level TTL limitations

{% include {{page.version.version}}/known-limitations/row-level-ttl-limitations.md %}

### Change data capture limitations

Change data capture (CDC) provides efficient, distributed, row-level changefeeds into Apache Kafka for downstream processing such as reporting, caching, or full-text indexing. It has the following known limitations:

{% include {{ page.version.version }}/known-limitations/cdc.md %}
{% include {{ page.version.version }}/known-limitations/cdc-transformations.md %}

## Unresolved limitations

### CockroachDB does not properly optimize some left and anti joins with GIN indexes

[Left joins](joins.html#left-outer-joins) and anti joins involving [`JSONB`](jsonb.html), [`ARRAY`](array.html), or [spatial-typed](spatial-data.html) columns with a multi-column or [partitioned](partition-by.html) [GIN index](inverted-indexes.html) will not take advantage of the index if the prefix columns of the index are unconstrained, or if they are constrained to multiple, constant values.
Expand Down Expand Up @@ -249,12 +316,6 @@ UNION ALL SELECT * FROM t1 LEFT JOIN t2 ON st_contains(t1.geom, t2.geom) AND t2.

{% include {{page.version.version}}/sql/expressions-as-on-conflict-targets.md %}

### Optimizer stale statistics deletion when columns are dropped

- {% include {{page.version.version}}/known-limitations/old-multi-col-stats.md %}

- {% include {{page.version.version}}/known-limitations/single-col-stats-deletion.md %}

### Automatic statistics refresher may not refresh after upgrade

{% include {{page.version.version}}/known-limitations/stats-refresh-upgrade.md %}
Expand Down Expand Up @@ -605,7 +666,13 @@ If the execution of a [join](joins.html) query exceeds the limit set for memory-

{% include {{ page.version.version }}/known-limitations/drop-unique-index-from-create-table.md %}

### User-defined functions
### Row-Level TTL limitations

{% include {{page.version.version}}/known-limitations/row-level-ttl-limitations.md %}

### Change data capture limitations

Change data capture (CDC) provides efficient, distributed, row-level changefeeds into Apache Kafka for downstream processing such as reporting, caching, or full-text indexing. It has the following known limitations:

{% include {{ page.version.version }}/known-limitations/udf-cdc-transformations.md %}
{% include {{ page.version.version }}/known-limitations/udf-limitations.md %}
{% include {{ page.version.version }}/known-limitations/cdc.md %}
{% include {{ page.version.version }}/known-limitations/cdc-transformations.md %}
43 changes: 40 additions & 3 deletions v22.2/user-defined-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,47 @@ If you do not specify a schema for the function `add` when you create it, the de

## Known limitations

User-defined functions are not supported in:
### Limitations on use of UDFs

{% include {{ page.version.version }}/known-limitations/udf-limitations.md %}
{% include {{ page.version.version }}/known-limitations/udf-cdc-transformations.md %}
User-defined functions are not currently supported in:

- Expressions (column, index, constraint) in tables.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/87699)

- Views.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/87699)

- Other user-defined functions.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/93049)

- [CDC transformations](https://www.cockroachlabs.com/docs/v22.2/cdc-transformations).

### Limitations on expressions allowed within UDFs

The following are not currently allowed within the body of a UDF:

- Subqueries in statements.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/87291)

- Mutation statements such as `INSERT`, `UPDATE`, `DELETE`, and `UPSERT`.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/87289)

- Expressions with `*` such as `SELECT *`.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/90080)

- CTEs (common table expressions).

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/92961)

- References to other user-defined functions.

[Tracking GitHub issue](https://github.com/cockroachdb/cockroach/issues/93049)

## See also

Expand Down

0 comments on commit 602af8f

Please sign in to comment.