Skip to main content
Publication date: March 6, 2023

Description

While executing on a column used in a partial index, all DML statements referencing the table fail with an error during the delete-only phase of the ALTER, which can last several hours for large tables. This includes , , , , and statements. This problem exists in all versions of CockroachDB since the introduction of partial indexes in .

Statement

This is resolved in CockroachDB by a fix that disallows dropping columns that are referenced by a partial index. This fix has been applied to maintenance releases of CockroachDB and ).

Mitigation

Users can avoid the issue by dropping any partial indexes using the column before dropping the column. Users of CockroachDB through and through are encouraged to upgrade to , , or a later version.

Impact

When executing ALTER TABLE DROP COLUMN of a column used in a partial index, all DML statements referencing the table fail with an error during the delete-only phase. DML statements not referencing the table are not affected. Questions about any technical alert can be directed to our support team.