mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Fixed after review
This commit is contained in:
parent
db52f9cab4
commit
5784dffd0d
@ -23,19 +23,14 @@ Usually, the UUID is generated automatically, but the user can also explicitly s
|
||||
```sql
|
||||
CREATE TABLE name UUID '28f1c61c-2970-457a-bffe-454156ddcfef' (n UInt64) ENGINE = ...;
|
||||
```
|
||||
|
||||
### DROP TABLE {#drop-table}
|
||||
|
||||
On `DROP TABLE` no data is removed, database `Atomic` just marks table as dropped by moving metadata to `/clickhouse_path/metadata_dropped/` and notifies background thread. Running queries still may use dropped table. Table will be actually removed when it's not in use.
|
||||
|
||||
### RENAME TABLE {#rename-table}
|
||||
|
||||
`RENAME` queries are performed without changing UUID and moving table data. These queries do not wait for the completion of queries using the table and will be executed instantly.
|
||||
|
||||
### DROP/DETACH {#drop-detach}
|
||||
|
||||
`DELETE` and `DETACH` queries are executed asynchronously — waits for the running `SELECT` queries to finish but is invisible to the new queries.
|
||||
You also can specify `NO DELAY` or `SYNC` mode. See [database_atomic_delay_before_drop_table_sec](../../operations/settings/settings.md#database_atomic_delay_before_drop_table_sec), [database_atomic_wait_for_drop_and_detach_synchronously](../../operations/settings/settings.md#database_atomic_wait_for_drop_and_detach_synchronously) settings.
|
||||
On `DROP TABLE` no data is removed, database `Atomic` just marks table as dropped by moving metadata to `/clickhouse_path/metadata_dropped/` and notifies background thread. Delay before final table data deletion is specify by [database_atomic_delay_before_drop_table_sec](../../operations/server-configuration-parameters/settings.md#database_atomic_delay_before_drop_table_sec) setting.
|
||||
You can specify synchronous mode using `SYNC` modifier. Use the [database_atomic_wait_for_drop_and_detach_synchronously](../../operations/settings/settings.md#database_atomic_wait_for_drop_and_detach_synchronously) setting to do this. In this case `DROP` waits for running `SELECT`, `INSERT` and other queries which are using the table to finish. Table will be actually removed when it's not in use.
|
||||
|
||||
### EXCHANGE TABLES {#exchange-tables}
|
||||
|
||||
|
@ -100,6 +100,11 @@ Default value: `1073741824` (1 GB).
|
||||
<size_limit>1073741824</size_limit>
|
||||
</core_dump>
|
||||
```
|
||||
## database_atomic_delay_before_drop_table_sec {#database_atomic_delay_before_drop_table_sec}
|
||||
|
||||
Sets the delay before remove table data in seconds. If the query has `SYNC` modifier, this setting is ignore.
|
||||
|
||||
Default value: `480` (8 minute).
|
||||
|
||||
## default_database {#default-database}
|
||||
|
||||
|
@ -2747,16 +2747,6 @@ Possible values:
|
||||
|
||||
Default value: `0`.
|
||||
|
||||
## database_atomic_delay_before_drop_table_sec {#database_atomic_delay_before_drop_table_sec}
|
||||
|
||||
Sets the delay before remove table data. If the query has `SYNC` modifier, this setting is ignore.
|
||||
|
||||
Possible values:
|
||||
|
||||
- Positive integer (in seconds).
|
||||
|
||||
Default value: `480` (8 minute).
|
||||
|
||||
## database_atomic_wait_for_drop_and_detach_synchronously {#database_atomic_wait_for_drop_and_detach_synchronously}
|
||||
|
||||
Adds a modifier `SYNC` to all `DROP` and `DETACH` queries.
|
||||
|
Loading…
Reference in New Issue
Block a user