You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot open file tmp_sizes.json: No such file or directory, when renaming a table #455
Since ClickHouse does not have truncate, I thought I would just create a new table with create ... as and then rename it:
create table test (s String) engine=TinyLog;
create table test_new as test;
drop table test;
rename table test_new to test;
But inserting into the new table gives an error:
insert into test values ('hello');
Code: 107. DB::Exception: Received from localhost:9000, 127.0.0.1. DB::Exception: Cannot open file /opt/clickhouse/data/default/test_new/tmp_sizes.json, errno: 2, strerror: No such file or directory.
Some part of ClickHouse is still using the old name (notice .../test_new/...)
By the way, one workarond is to first rename and then create:
rename table test to test_old;
create table test as test_old;
drop table test_old;
Activity
#455 also update tmp_files_info_path when files_info_path is changed
artpaul commentedon Feb 6, 2017
@tobia Thanks for reporting the error. The fix is trivial.
Merge pull request #457 from yandex/issue-455
Merge pull request ClickHouse#455 from Altinity/23.8.16-image-tag