clickhouse-local instances use same data by default · Issue #9848 · ClickHouse/ClickHouse · GitHub
Skip to content

clickhouse-local instances use same data by default #9848

Description

@akuzm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp-localclickhouse-local / embedded modes (incl. local file processing).unexpected behaviourResult is unexpected, but not entirely wrong at the same time.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions