-
Notifications
You must be signed in to change notification settings - Fork 8.3k
clickhouse-local instances use same data by default #9848
Copy link
Copy link
Closed
Labels
comp-localclickhouse-local / embedded modes (incl. local file processing).clickhouse-local / embedded modes (incl. local file processing).unexpected behaviourResult is unexpected, but not entirely wrong at the same time.Result is unexpected, but not entirely wrong at the same time.
Description
Every clickhouse-local process uses the same default database -- DatabaseMemory called '_local', with data stored in current directory. This leads to counterintuitive interaction between the instances, if you just want to process some data in parallel.
A solution is to use a unique data path for each instance (add pid to path), if not explicitly specified. We should also move it to /tmp because current directory might not even be writable.
There still is a way to explicitly specify a particular data path using --path option:
$ clickhouse-local --query "select count(*) from default.hits" -- --path db
8873898
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
comp-localclickhouse-local / embedded modes (incl. local file processing).clickhouse-local / embedded modes (incl. local file processing).unexpected behaviourResult is unexpected, but not entirely wrong at the same time.Result is unexpected, but not entirely wrong at the same time.