Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC. Slightly better persistency in clickhouse-local #50647

Open
alexey-milovidov opened this issue Jun 7, 2023 · 2 comments
Open

RFC. Slightly better persistency in clickhouse-local #50647

alexey-milovidov opened this issue Jun 7, 2023 · 2 comments
Labels
feature warmup task The task for new ClickHouse team members. Low risk, moderate complexity, no urgency.

Comments

@alexey-milovidov
Copy link
Member

  1. It should use Atomic database engine instead of Memory for the default database, so the metadata will be preserved across runs.
  2. The default database should be named default instead of _local.
  3. It should use ./clickhouse directory as the working directory instead of a random directory in /tmp
  4. Nevertheless, if the directory cannot be created, it should continue working.
  5. Temporary tables for File IO should use the mechanism of the temporary tables.
  6. Ideally, it should not create any directories if the queries are purely stateless like SELECT 1.
@Algunenano
Copy link
Member

Algunenano commented Jun 7, 2023

I use clickhouse-local all the time to test temporary things that I want to go away on exit (things like #50628 (comment) for example). So it'd be great to keep the temporary behaviour as an option if possible (clickhouse local --temp / clickhouse local --persist ?)

No strong opinion about the other things

@alexey-milovidov
Copy link
Member Author

One idea for clickhouse-local:

  • use default database as default;
  • make it Atomic instead of Memory;
  • but avoid creating any files unless the first table is created;
  • when we create tables implicitly for the inputs, instead of normal tables, create them as temporary tables with an engine - in this way, we will avoid creating the database files in most cases.

Bonus: the support for EXCHANGE, CREATE OR REPLACE, etc.

@alexey-milovidov alexey-milovidov added the warmup task The task for new ClickHouse team members. Low risk, moderate complexity, no urgency. label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature warmup task The task for new ClickHouse team members. Low risk, moderate complexity, no urgency.
Projects
None yet
Development

No branches or pull requests

3 participants