Skip to content

sql: create jobs for truncated and dropped tables #4103

@jseldess

Description

@jseldess

PR: https://github.com/cockroachdb/cockroach/pull/29993/commits

Creates a job for statements involving dropping or truncated tables, including
DROP DATABASE. The job is completed when the GC TTL expires and both table
data and ID is deleted for each of the tables involved.

Detailed running statuses are added to provide visibility to the
progress of the dropping or truncating of tables. This is surfaced by
adding an additional status field to the payload proto of jobs, and
concatenated to the running status when populating the interal jobs
table.

For dropping or truncating jobs, the detailed running status is
determined by the status of the table at the earliest stage of the
schema change.

Fixes #19004

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions