Skip to content

Commit

Permalink
Add new known limitations and remove resolved limitations
Browse files Browse the repository at this point in the history
Fixes #6835.
Fixes #6837.
  • Loading branch information
jseldess committed Apr 13, 2020
1 parent 6ed45b7 commit 127fa47
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 64 deletions.
8 changes: 0 additions & 8 deletions v19.1/known-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,6 @@ This conversion is currently only well defined for a small range of integers, i.

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

### Cannot decommission nodes

The [`cockroach node decommission`](https://www.cockroachlabs.com/docs/stable/view-node-details.html#subcommands) command will hang when used to target a set of nodes that cannot be removed without breaking the configured replication rules.

Example: decommissioning a node in a three node cluster will not work because ranges would become under-replicated.

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

### Importing data using the PostgreSQL COPY protocol

Currently, the built-in SQL shell provided with CockroachDB (`cockroach sql` / `cockroach demo`) does not support importing data using the `COPY` statement. Users can use the `psql` client command provided with PostgreSQL to load this data into CockroachDB instead. For details, see [Import from generic SQL dump](https://www.cockroachlabs.com/docs/stable/import-data.html#import-from-generic-sql-dump).
Expand Down
8 changes: 0 additions & 8 deletions v19.2/known-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,6 @@ As a workaround, set `default_int_size` via your database driver, or ensure that

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

### Cannot decommission nodes

The [`cockroach node decommission`](https://www.cockroachlabs.com/docs/stable/cockroach-node.html#subcommands) command will hang when used to target a set of nodes that cannot be removed without breaking the configured replication rules.

Example: decommissioning a node in a three node cluster will not work because ranges would become under-replicated.

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

### Importing data using the PostgreSQL COPY protocol

Currently, the built-in SQL shell provided with CockroachDB (`cockroach sql` / `cockroach demo`) does not support importing data using the `COPY` statement. Users can use the `psql` client command provided with PostgreSQL to load this data into CockroachDB instead. For details, see [Import from generic SQL dump](https://www.cockroachlabs.com/docs/stable/import-data.html#import-from-generic-sql-dump).
Expand Down
8 changes: 0 additions & 8 deletions v2.1/known-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,6 @@ This conversion is currently only well defined for a small range of integers, i.

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

### Cannot decommission nodes

The [`cockroach node decommission`](https://www.cockroachlabs.com/docs/stable/view-node-details.html#subcommands) command will hang when used to target a set of nodes that cannot be removed without breaking the configured replication rules.

Example: decommissioning a node in a three node cluster will not work because ranges would become under-replicated.

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

### Importing data using the PostgreSQL COPY protocol

Currently, the built-in SQL shell provided with CockroachDB (`cockroach sql` / `cockroach demo`) does not support importing data using the `COPY` statement. Users can use the `psql` client command provided with PostgreSQL to load this data into CockroachDB instead. For details, see [Import from generic SQL dump](https://www.cockroachlabs.com/docs/stable/import-data.html#import-from-generic-sql-dump).
Expand Down
93 changes: 53 additions & 40 deletions v20.1/known-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,57 @@ toc: true

This page describes newly identified limitations in the CockroachDB {{page.release_info.version}} release as well as unresolved limitations identified in earlier releases.

## New limitations

### `ROLLBACK TO SAVEPOINT` in high-priority transactions containing DDL

Transactions with [priority `HIGH`](transactions.html#transaction-priorities) that contain DDL and `ROLLBACK TO SAVEPOINT` are not supported, as they could result in a deadlock. For example:

~~~ sql
> BEGIN PRIORITY HIGH; SAVEPOINT s; CREATE TABLE t(x INT); ROLLBACK TO SAVEPOINT s;
~~~

~~~
ERROR: unimplemented: cannot use ROLLBACK TO SAVEPOINT in a HIGH PRIORITY transaction containing DDL
SQLSTATE: 0A000
HINT: You have attempted to use a feature that is not yet implemented.
See: https://github.com/cockroachdb/cockroach/issues/46414
~~~

[Tracking Github Issue](https://github.com/cockroachdb/cockroach/issues/46414)

### Column name from an outer column inside a subquery differs from PostgreSQL

CockroachDB returns the column name from an outer column inside a subquery as `?column?`, unlike PostgreSQL. For example:

~~~ sql
> SELECT (SELECT t.*) FROM (VALUES (1)) t(x);
~~~

CockroachDB:

~~~
?column?
------------
1
~~~

PostgreSQL:

~~~
x
---
1
~~~

[Tracking Github Issue](https://github.com/cockroachdb/cockroach/issues/46563)

### Privileges required to access to certain virtual tables differs from PostgreSQL

Access to certain virtual tables in the `pg_catalog` and `information_schema` schemas require more privileges than in PostgreSQL. For example, in CockroachDB, access to `pg_catalog.pg_types` requires the `SELECT` privilege on the current database, whereas this privilege is not required in PostgreSQL.

[Tracking Github Issue](https://github.com/cockroachdb/cockroach/issues/43177)

## Unresolved limitations

### Adding stores to a node
Expand Down Expand Up @@ -33,7 +84,7 @@ An `x` value less than `1` would result in the following error:
pq: check constraint violated
~~~

[Tracking Github Issue](https://github.com/cockroachdb/cockroach/issues/35370)
[Tracking Github Issue](https://github.com/cockroachdb/cockroach/issues/35370)

### Cold starts of large clusters may require manual intervention

Expand Down Expand Up @@ -128,56 +179,26 @@ For multi-core systems, the user CPU percent can be greater than 100%. Full util

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

### `GROUP BY` referring to `SELECT` aliases

Applications developed for PostgreSQL that use `GROUP BY` to refer to column aliases _produced_ in the same `SELECT` clause must be changed to use the full underlying expression instead. For example, `SELECT x+y AS z ... GROUP BY z` must be changed to `SELECT x+y AS z ... GROUP BY x+y`. Otherwise, CockroachDB will produce either a planning error or, in some cases, invalid results.

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

### `TRUNCATE` does not behave like `DELETE`

`TRUNCATE` is not a DML statement, but instead works as a DDL statement. Its limitations are the same as other DDL statements, which are outlined in [Online Schema Changes: Limitations](online-schema-changes.html#limitations)

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

### Using columns in `SELECT` not listed in `GROUP BY`

Applications developed for PostgreSQL can exploit the fact that PostgreSQL allows a `SELECT` clause to name a column that is not also listed in `GROUP BY` in some cases, for example `SELECT a GROUP BY b`. This is not yet supported by CockroachDB.

To work around this limitation, and depending on expected results, the rendered columns should be either added at the end of the `GROUP BY` list (e.g., `SELECT a GROUP BY b, a`), or `DISTINCT` should also be used (e.g., `SELECT DISTINCT a GROUP BY b`).

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

### Cannot `DELETE` multiple rows with self-referencing FKs

Because CockroachDB checks foreign keys eagerly (i.e., per row), it cannot trivially delete multiple rows from a table with a self-referencing foreign key.

To successfully delete multiple rows with self-referencing foreign keys, you need to ensure they're deleted in an order that doesn't violate the foreign key constraint.

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

### `DISTINCT` operations cannot operate over JSON values

CockroachDB does not currently key-encode JSON values, which prevents `DISTINCT` filters from working on them.

As a workaround, you can return the JSON field's values to a `string` using the `->>` operator, e.g., `SELECT DISTINCT col->>'field'...`.

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

### Current sequence value not checked when updating min/max value

Altering the minimum or maximum value of a series does not check the current value of a series. This means that it is possible to silently set the maximum to a value less than, or a minimum value greater than, the current value.

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

### Using common table expressions in `VALUES` and `UNION` clauses

When the [cost-based optimizer](cost-based-optimizer.html) is disabled, or when it does not support a query, a common table expression defined outside of a `VALUES` or `UNION `clause will not be available inside it. For example `...WITH a AS (...) SELECT ... FROM (VALUES(SELECT * FROM a))`.

This limitation will be lifted when the cost-based optimizer covers all queries. Until then, applications can work around this limitation by including the entire CTE query in the place where it is used.

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

### Using `default_int_size` session variable in batch of statements

When setting the `default_int_size` [session variable](set-vars.html) in a batch of statements such as `SET default_int_size='int4'; SELECT 1::IN`, the `default_int_size` variable will not take affect until the next statement. This happens because statement parsing takes place asynchronously from statement execution.
Expand All @@ -186,14 +207,6 @@ As a workaround, set `default_int_size` via your database driver, or ensure that

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

### Cannot decommission nodes

The [`cockroach node decommission`](https://www.cockroachlabs.com/docs/stable/cockroach-node.html#subcommands) command will hang when used to target a set of nodes that cannot be removed without breaking the configured replication rules.

Example: decommissioning a node in a three node cluster will not work because ranges would become under-replicated.

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

### Importing data using the PostgreSQL COPY protocol

Currently, the built-in SQL shell provided with CockroachDB (`cockroach sql` / `cockroach demo`) does not support importing data using the `COPY` statement. Users can use the `psql` client command provided with PostgreSQL to load this data into CockroachDB instead. For details, see [Import from generic SQL dump](https://www.cockroachlabs.com/docs/stable/import-data.html#import-from-generic-sql-dump).
Expand Down

0 comments on commit 127fa47

Please sign in to comment.