cockroachdb / cockroachdb/docs

Document "schema_change_policy = 'nobackfill' is not fulfilled within explicit transaction

Ouverte
#21,539 1 commentaire 0 réactions 1 personne assignée Réclamée par @rmloveland Voir sur GitHub
Langage dominant
HTML
Étoiles
212
Forks
476
Merge moyen
40 min
PR mergées (30 j)
3

Description

When a changefeed is created with the 'schema_change_policy = 'nobackfill' option, and is followed by a schema change that performs a backfill - we do not normally expect any output to the changefeed.

However, if the schema change is performed as part of an explicit transaction, then it does emit the entire table to the changefeed, undermining any expectation of the 'nobackfill' option.

Example:

This command would not emit the entire table despite adding a default value to every row:

```
ALTER TABLE t ADD COLUMN x INT DEFAULT 0 NOT NULL;
```

However, this would emit the entire table, despite 'nobackfill':

```
BEGIN;
ALTER TABLE t ADD COLUMN x INT DEFAULT 0 NOT NULL;
COMMIT;
```

SQL Foundations are working on a fix but this will take a long time, and we've both agreed this behaviour should be documented.

The suggestion is that a sentence is added to the 'schema_change_policy' box in https://www.cockroachlabs.com/docs/stable/create-changefeed#query-parameters.

This only applies to versions before 25.1.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.