ClickHouse / ClickHouse/ClickHouse

UNDROP PARTITION|PART

Open
#58,011 0 comments 0 reactions 0 assignees View on GitHub
comp-mergetree feature minor
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

**Use case**

Currently, ClickHouse allows us to drop partitions or parts from a table using the following statement:
```sql
ALTER TABLE table_name [ON CLUSTER cluster] DROP PARTITION|PART partition_expr
```

However, the partition or part is not immediately deleted. This means that we have some time (~10 min) to UNDROP the partition or part:
```sql
ALTER TABLE table_name [ON CLUSTER cluster] UNDROP PARTITION|PART partition_expr
```
This feature would allow users to more easily recover from accidentally dropping partitions or parts. The same way as it's done for [UNDROP TABLE](https://clickhouse.com/docs/en/sql-reference/statements/undrop).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.