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 17, 2020
1 parent 6bf18fb commit 61e089a
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 107 deletions.
40 changes: 27 additions & 13 deletions v19.1/known-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ 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

### Enterprise `BACKUP` does not capture database/table/column comments

The [`COMMENT ON`](comment-on.html) statement associates comments to databases, tables, or columns. However, the internal table (`system.comments`) in which these comments are stored is not captured by enterprise [`BACKUP`](backup.html).

As a workaround, use the [`cockroach dump`](sql-dump.html) command, which emits `COMMENT ON` statements alongside `CREATE` statements.

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

## Unresolved limitations

### Adding stores to a node
Expand Down Expand Up @@ -169,14 +179,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 Expand Up @@ -224,25 +226,37 @@ Most client drivers and frameworks use the text format to pass placeholder value

{% include {{ page.version.version }}/known-limitations/partitioning-with-placeholders.md %}

### Adding a column with certain `DEFAULT` values
### Adding a column with sequence-based `DEFAULT` values

It is currently not possible to [add a column](add-column.html) to a table when the column uses a [sequence](create-sequence.html), [computed column](computed-columns.html), or certain evaluated expressions as the [`DEFAULT`](default-value.html) value, for example:
It is currently not possible to [add a column](add-column.html) to a table when the column uses a [sequence](create-sequence.html) as the [`DEFAULT`](default-value.html) value, for example:

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE add_default ADD g INT DEFAULT nextval('initial_seq')
> CREATE TABLE t (x INT);
~~~

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE add_default ADD g OID DEFAULT 'foo'::regclass::oid
> INSERT INTO t(x) VALUES (1), (2), (3);
~~~

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE add_default ADD g INT DEFAULT 'foo'::regtype::INT
> CREATE SEQUENCE s;
~~~

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE t ADD COLUMN y INT DEFAULT nextval('s');
~~~

~~~
ERROR: nextval(): unimplemented: cannot evaluate scalar expressions containing sequence operations in this context
SQLSTATE: 0A000
~~~

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

### Available capacity metric in the Admin UI

{% include {{ page.version.version }}/misc/available-capacity-metric.md %}
Expand Down
46 changes: 25 additions & 21 deletions v19.2/known-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ pq: check constraint violated

## Unresolved limitations

### Enterprise `BACKUP` does not capture database/table/column comments

The [`COMMENT ON`](comment-on.html) statement associates comments to databases, tables, or columns. However, the internal table (`system.comments`) in which these comments are stored is not captured by enterprise [`BACKUP`](backup.html).

As a workaround, use the [`cockroach dump`](cockroach-dump.html) command, which emits `COMMENT ON` statements alongside `CREATE` statements.

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

### Adding stores to a node

{% include {{ page.version.version }}/known-limitations/adding-stores-to-node.md %}
Expand Down Expand Up @@ -188,14 +196,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 Expand Up @@ -228,25 +228,37 @@ Most client drivers and frameworks use the text format to pass placeholder value

{% include {{ page.version.version }}/known-limitations/partitioning-with-placeholders.md %}

### Adding a column with certain `DEFAULT` values
### Adding a column with sequence-based `DEFAULT` values

It is currently not possible to [add a column](add-column.html) to a table when the column uses a [sequence](create-sequence.html), [computed column](computed-columns.html), or certain evaluated expressions as the [`DEFAULT`](default-value.html) value, for example:
It is currently not possible to [add a column](add-column.html) to a table when the column uses a [sequence](create-sequence.html) as the [`DEFAULT`](default-value.html) value, for example:

{% include copy-clipboard.html %}
~~~ sql
> CREATE TABLE t (x INT);
~~~

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE add_default ADD g INT DEFAULT nextval('initial_seq')
> INSERT INTO t(x) VALUES (1), (2), (3);
~~~

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE add_default ADD g OID DEFAULT 'foo'::regclass::oid
> CREATE SEQUENCE s;
~~~

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE add_default ADD g INT DEFAULT 'foo'::regtype::INT
> ALTER TABLE t ADD COLUMN y INT DEFAULT nextval('s');
~~~

~~~
ERROR: nextval(): unimplemented: cannot evaluate scalar expressions containing sequence operations in this context
SQLSTATE: 0A000
~~~

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

### Available capacity metric in the Admin UI

{% include {{ page.version.version }}/misc/available-capacity-metric.md %}
Expand All @@ -269,14 +281,6 @@ When inserting/updating all columns of a table, and the table has no secondary i

This issue is particularly relevant when using a simple SQL table of two columns to [simulate direct KV access](sql-faqs.html#can-i-use-cockroachdb-as-a-key-value-store). In this case, be sure to use the `UPSERT` statement.

### Write and update limits for a single statement

A single statement can perform at most 64MiB of combined updates. When a statement exceeds these limits, its transaction gets aborted. Currently, `INSERT INTO ... SELECT FROM` and `CREATE TABLE AS SELECT` queries may encounter these limits.

To increase these limits, you can update the [cluster-wide setting](cluster-settings.html) `kv.raft.command.max_size`, but note that increasing this setting can affect the memory utilization of nodes in the cluster. For `INSERT INTO .. SELECT FROM` queries in particular, another workaround is to manually page through the data you want to insert using separate transactions.

In the v1.1 release, the limit referred to a whole transaction (i.e., the sum of changes done by all statements) and capped both the number and the size of update. In this release, there's only a size limit, and it applies independently to each statement. Note that even though not directly restricted any more, large transactions can have performance implications on the cluster.

### Using `\|` to perform a large input in the SQL shell

In the [built-in SQL shell](cockroach-sql.html), using the [`\|`](cockroach-sql.html#commands) operator to perform a large number of inputs from a file can cause the server to close the connection. This is because `\|` sends the entire file as a single query to the server, which can exceed the upper bound on the size of a packet the server can accept from any client (16MB).
Expand Down
1 change: 0 additions & 1 deletion v19.2/migrate-from-oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ When moving from Oracle to CockroachDB data types, consider the following:
- [Silent validation error with `DECIMAL` values](known-limitations.html#silent-validation-error-with-decimal-values)
- [Schema changes within transactions](known-limitations.html#schema-changes-within-transactions)
- [Schema changes between executions of prepared statements](online-schema-changes.html#no-schema-changes-between-executions-of-prepared-statements)
- [Write and update limits for a single statement](known-limitations.html#write-and-update-limits-for-a-single-statement)
- If [`JSON`](jsonb.html) columns are used only for payload, consider switching to [`BYTES`](bytes.html).
- Max size of a single column family (64 MiB by default).

Expand Down
25 changes: 20 additions & 5 deletions v2.0/known-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,37 @@ However, the same statement with `INSERT ... ON CONFLICT` incorrectly succeeds a

{% include {{ page.version.version }}/known-limitations/partitioning-with-placeholders.md %}

### Adding a column with certain `DEFAULT` values
### Adding a column with sequence-based `DEFAULT` values

It is currently not possible to [add a column](add-column.html) to a table when the column uses a [sequence](create-sequence.html), [computed column](computed-columns.html), or certain evaluated expressions as the [`DEFAULT`](default-value.html) value, for example:
It is currently not possible to [add a column](add-column.html) to a table when the column uses a [sequence](create-sequence.html) as the [`DEFAULT`](default-value.html) value, for example:

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE add_default ADD g INT DEFAULT nextval('initial_seq')
> CREATE TABLE t (x INT);
~~~

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE add_default ADD g OID DEFAULT 'foo'::regclass::oid
> INSERT INTO t(x) VALUES (1), (2), (3);
~~~

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE add_default ADD g INT DEFAULT 'foo'::regtype::INT
> CREATE SEQUENCE s;
~~~

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE t ADD COLUMN y INT DEFAULT nextval('s');
~~~

~~~
ERROR: nextval(): unimplemented: cannot evaluate scalar expressions containing sequence operations in this context
SQLSTATE: 0A000
~~~

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

## Unresolved Limitations

### Database and table renames are not transactional
Expand Down
30 changes: 17 additions & 13 deletions v2.1/known-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,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 Expand Up @@ -203,25 +195,37 @@ Most client drivers and frameworks use the text format to pass placeholder value

{% include {{ page.version.version }}/known-limitations/partitioning-with-placeholders.md %}

### Adding a column with certain `DEFAULT` values
### Adding a column with sequence-based `DEFAULT` values

It is currently not possible to [add a column](add-column.html) to a table when the column uses a [sequence](create-sequence.html) as the [`DEFAULT`](default-value.html) value, for example:

It is currently not possible to [add a column](add-column.html) to a table when the column uses a [sequence](create-sequence.html), [computed column](computed-columns.html), or certain evaluated expressions as the [`DEFAULT`](default-value.html) value, for example:
{% include copy-clipboard.html %}
~~~ sql
> CREATE TABLE t (x INT);
~~~

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE add_default ADD g INT DEFAULT nextval('initial_seq')
> INSERT INTO t(x) VALUES (1), (2), (3);
~~~

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE add_default ADD g OID DEFAULT 'foo'::regclass::oid
> CREATE SEQUENCE s;
~~~

{% include copy-clipboard.html %}
~~~ sql
> ALTER TABLE add_default ADD g INT DEFAULT 'foo'::regtype::INT
> ALTER TABLE t ADD COLUMN y INT DEFAULT nextval('s');
~~~

~~~
ERROR: nextval(): unimplemented: cannot evaluate scalar expressions containing sequence operations in this context
SQLSTATE: 0A000
~~~

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

### Available capacity metric in the Admin UI

{% include {{page.version.version}}/misc/available-capacity-metric.md %}
Expand Down
Loading

0 comments on commit 61e089a

Please sign in to comment.