After the restart, prompt "Could not create table sys.column_versions_purge_log"
After the restart, prompt "io.questdb.Bootstrap$BootstrapException: io.questdb.griffin.SqlException: [27] Could not create table, name is reserved [table=sys.column_versions_purge_log]", this is a newly installed questDB without any data. What causes this?
I just just started using questDB,No answer was found in the documentation. command: ./bin/questdb.sh start -d ./data -t questdb
How do I solve it? thanks!
====================supplementary content============================ QuestDB start log
[root@centos72 questdb-7.3.9]# ls
bin conf legal lib release
[root@centos72 questdb-7.3.9]# mkdir -p data
[root@centos72 questdb-7.3.9]# ls
bin conf data legal lib release
[root@centos72 questdb-7.3.9]# ./bin/questdb.sh start -d ./data -t questdb
___ _ ____ ____
/ _ \ _ _ ___ ___| |_| _ \| __ )
| | | | | | |/ _ \/ __| __| | | | _ \
| |_| | |_| | __/\__ \ |_| |_| | |_) |
\__\_\\__,_|\___||___/\__|____/|____/
www.questdb.io
JAVA: ./bin/java
Reading log configuration from ./data/conf/log.conf
[root@centos72 questdb-7.3.9]# ./bin/questdb.sh stop -d ./data -t questdb
___ _ ____ ____
/ _ \ _ _ ___ ___| |_| _ \| __ )
| | | | | | |/ _ \/ __| __| | | | _ \
| |_| | |_| | __/\__ \ |_| |_| | |_) |
\__\_\\__,_|\___||___/\__|____/|____/
www.questdb.io
Stopping 29403
QuestDB is shutting down...
Pre-touch magic number: 0
QuestDB is shutdown.
Stopped 29403
[root@centos72 questdb-7.3.9]# ./bin/questdb.sh start -d ./data -t questdb
___ _ ____ ____
/ _ \ _ _ ___ ___| |_| _ \| __ )
| | | | | | |/ _ \/ __| __| | | | _ \
| |_| | |_| | __/\__ \ |_| |_| | |_) |
\__\_\\__,_|\___||___/\__|____/|____/
www.questdb.io
JAVA: ./bin/java
Reading log configuration from ./data/conf/log.conf
[root@centos72 questdb-7.3.9]# io.questdb.Bootstrap$BootstrapException: io.questdb.griffin.SqlException: [27] Could not create table, name is reserved [table=sys.column_versions_purge_log]
at [email protected]/io.questdb.ServerMain$1.configureSharedPool(ServerMain.java:310)
at [email protected]/io.questdb.WorkerPoolManager.<init>(WorkerPoolManager.java:50)
at [email protected]/io.questdb.ServerMain$1.<init>(ServerMain.java:254)
at [email protected]/io.questdb.ServerMain.initialize(ServerMain.java:254)
at [email protected]/io.questdb.ServerMain.start(ServerMain.java:218)
at [email protected]/io.questdb.ServerMain.main(ServerMain.java:135)
Caused by: io.questdb.griffin.SqlException: [27] Could not create table, name is reserved [table=sys.column_versions_purge_log]
at [email protected]/io.questdb.griffin.SqlException.position(SqlException.java:111)
at [email protected]/io.questdb.griffin.SqlException.$(SqlException.java:48)
at [email protected]/io.questdb.griffin.SqlCompilerImpl.createTable(SqlCompilerImpl.java:1893)
at [email protected]/io.questdb.griffin.SqlCompilerImpl.executeWithRetries(SqlCompilerImpl.java:2004)
at [email protected]/io.questdb.griffin.SqlCompilerImpl.createTableWithRetries(SqlCompilerImpl.java:1988)
at [email protected]/io.questdb.griffin.SqlCompilerImpl.compileUsingModel(SqlCompilerImpl.java:1475)
at [email protected]/io.questdb.griffin.SqlCompilerImpl.compileInner(SqlCompilerImpl.java:1432)
at [email protected]/io.questdb.griffin.SqlCompilerImpl.compile(SqlCompilerImpl.java:234)
at [email protected]/io.questdb.griffin.QueryBuilder.compile(QueryBuilder.java:30)
at [email protected]/io.questdb.cairo.ColumnPurgeJob.<init>(ColumnPurgeJob.java:110)
at [email protected]/io.questdb.cairo.O3Utils.setupWorkerPool(O3Utils.java:58)
at [email protected]/io.questdb.ServerMain$1.configureSharedPool(ServerMain.java:268)
... 5 more
QuestDB print content "./data/log/stdout-2024-02-06T14-09-37.txt"
[root@centos72 log]# tail -100f stdout-2024-02-06T14-09-37.txt
2024-02-06T06:09:38.161435Z A server-main QuestDB 7.3.9. Copyright (C) 2014-2024, all rights reserved.
2024-02-06T06:09:38.483650Z A server-main OS/Arch linux/amd64 [SSE2,4, 64 bits, 8 processors]
2024-02-06T06:09:38.483859Z A server-main fs.file-max checked [limit=1024000]
2024-02-06T06:09:38.484128Z A server-main vm.max_map_count checked [limit=262144]
2024-02-06T06:09:38.501865Z I server-main Web Console is up to date
2024-02-06T06:09:38.515051Z A server-main Server config: ./data/conf/server.conf
2024-02-06T06:09:38.597579Z I i.q.c.t.t.InputFormatConfiguration loading input format config [resource=/text_loader.json]
2024-02-06T06:09:38.630424Z A server-main Config:
2024-02-06T06:09:38.630478Z A server-main - http.enabled : true
2024-02-06T06:09:38.630536Z A server-main - tcp.enabled : true
2024-02-06T06:09:38.630596Z A server-main - pg.enabled : true
2024-02-06T06:09:38.630629Z A server-main - attach partition suffix: .attachable
2024-02-06T06:09:38.630677Z A server-main - open database [id=6356196058855321310.-5068069947325151875]
2024-02-06T06:09:38.630910Z A server-main - db root: [path=/opt/questdb-7.3.9/./data/db, magic=0x58465342] -> SUPPORTED
2024-02-06T06:09:38.631015Z A server-main - backup root: NOT SET
2024-02-06T06:09:38.631107Z A server-main - snapshot root: [path=/opt/questdb-7.3.9/./data/snapshot, magic=0x00] -> UNSUPPORTED (SYSTEM COULD BE UNSTABLE)
2024-02-06T06:09:38.631180Z A server-main - sql copy input root: NOT SET
2024-02-06T06:09:38.631219Z A server-main - sql copy input worker root: NOT SET
2024-02-06T06:09:38.633627Z A server-main - SQL JIT compiler mode: on
2024-02-06T06:09:38.637143Z A server-main Metrics are disabled, health check endpoint will not consider unhandled errors
2024-02-06T06:09:38.644854Z I i.q.g.FunctionFactoryCache loading functions [test=false]
2024-02-06T06:09:39.017870Z I i.q.c.m.EngineMigration upgrading database [version=427]
2024-02-06T06:09:39.020631Z I i.q.c.m.EngineMigration upgraded tables to 427
2024-02-06T06:09:39.025344Z I i.q.c.TableNameRegistryStore reloading tables file [path=/opt/questdb-7.3.9/./data/db/tables.d.0, threadId=1]
2024-02-06T06:09:39.031279Z I i.q.c.TableNameRegistryStore reloading tables file [path=/opt/questdb-7.3.9/./data/db/tables.d.0, threadId=1]
2024-02-06T06:09:39.200205Z I i.q.g.SqlCompilerImpl parse [fd=-1, thread=1, q=CREATE TABLE IF NOT EXISTS "sys.column_versions_purge_log" (ts timestamp, table_name symbol, column_name symbol, table_id int, truncate_version long, columnType int, table_partition_by int, updated_txn long, column_version long, partition_timestamp timestamp, partition_name_txn long,completed timestamp) timestamp(ts) partition by MONTH BYPASS WAL]
2024-02-06T06:09:39.205914Z I i.q.c.CairoEngine locked [table=`sys.column_versions_purge_log`, thread=1]
2024-02-06T06:09:39.206949Z I i.q.c.CairoEngine unlocked [table=`sys.column_versions_purge_log`]
2024-02-06T06:09:39.207074Z E i.q.g.SqlCompilerImpl could not create table [error=
io.questdb.cairo.CairoException: [-1] name is reserved [table=sys.column_versions_purge_log]
at io.questdb.cairo.CairoException.instance(CairoException.java:310)
at io.questdb.cairo.CairoException.nonCritical(CairoException.java:120)
at io.questdb.cairo.CairoEngine.createTableUnsafe(CairoEngine.java:1206)
at io.questdb.cairo.CairoEngine.createTableUnsecure(CairoEngine.java:1258)
at io.questdb.cairo.CairoEngine.createTable(CairoEngine.java:300)
at io.questdb.griffin.SqlCompilerImpl.createTable(SqlCompilerImpl.java:1863)
at io.questdb.griffin.SqlCompilerImpl.executeWithRetries(SqlCompilerImpl.java:2004)
at io.questdb.griffin.SqlCompilerImpl.createTableWithRetries(SqlCompilerImpl.java:1988)
at io.questdb.griffin.SqlCompilerImpl.compileUsingModel(SqlCompilerImpl.java:1475)
at io.questdb.griffin.SqlCompilerImpl.compileInner(SqlCompilerImpl.java:1432)
at io.questdb.griffin.SqlCompilerImpl.compile(SqlCompilerImpl.java:234)
at io.questdb.griffin.QueryBuilder.compile(QueryBuilder.java:30)
at io.questdb.cairo.ColumnPurgeJob.<init>(ColumnPurgeJob.java:110)
at io.questdb.cairo.O3Utils.setupWorkerPool(O3Utils.java:58)
at io.questdb.ServerMain$1.configureSharedPool(ServerMain.java:268)
at io.questdb.WorkerPoolManager.<init>(WorkerPoolManager.java:50)
at io.questdb.ServerMain$1.<init>(ServerMain.java:254)
at io.questdb.ServerMain.initialize(ServerMain.java:254)
at io.questdb.ServerMain.start(ServerMain.java:218)
at io.questdb.ServerMain.main(ServerMain.java:135)
file system:
[root@centos72 opt]# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
|-sda1 swap xxx457cf9-xxxx-xxxxxxxxxxxxxxx [SWAP]
`-sda2 xfs xxx43080-xxxx-xxxxxxxxxxxxxxx /
default install ,default config!
thanks!
===================supplementary content===========================
Successfully restarted by deleting the default table folder;
But I'm still not sure what caused the problem. If you know, you can continue to leave a message;
Thank you!
I think one way to end up with this error would be to start 2 QuestDB instances at the exact same time, both pointing to the same empty database root directory. Both QuestDB instances would start creating sys tables, and the one losing the race could end up with the above error, because the table directory would already exist on the disk by the time it would try to create it.
If you are 100% sure that only a single instance of QuestDB was started, please, share the logs. It would be very helpful to see the content of you database root dir too.
Also, is this a one-off error, or you can reproduce it? Another possibility is that QuestDB root dir is located on an unsupported file system. Logs could confirm that.