Skip to content

Docs: TRUNCATE seems affected by keyword SYNC but it is not explicit in documentation #3817

Open
@LPauzies

Description

@LPauzies

Describe the issue

In ClickHouse documentation, for TRUNCATE TABLE : https://clickhouse.com/docs/sql-reference/statements/truncate#truncate-table, the SYNC keyword seems not available. However, it is possible to perform such a query in a cluster 2S2R on a ReplicatedReplacingMergeTree table:

TRUNCATE TABLE db.table SYNC;

And it seems to TRUNCATE the table in all the replicas synchronously.

Is it possible to make it explicit in the documentation ?

Here is the original issue that create the investigations around "synchronous truncate" in our company : #3816

Additional context

Using CH :

SELECT version()

Query id: e37abd04-e294-4b9c-ae35-76fc0788d0a6

   ┌─version()───┐
1. │ 24.8.1.2684 │
   └─────────────┘

1 row in set. Elapsed: 0.001 sec. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions