database - QuestDB root folder - Stack Overflow

Is there any way of knowing which is the root folder of a running QuestDB instance? Programmatically if

Is there any way of knowing which is the root folder of a running QuestDB instance? Programmatically if possible.

I have checked all the meta functions, and they seem to provide information about the disk storage capacity or about the current version, but they fail to provide root folder information.

I also tried with SHOW PARAMETERS, but the root folder is not a config parameter, but a runtime parameter, so it is not listed there. I am running out of ideas here.

Is there any way of knowing which is the root folder of a running QuestDB instance? Programmatically if possible.

I have checked all the meta functions, and they seem to provide information about the disk storage capacity or about the current version, but they fail to provide root folder information.

I also tried with SHOW PARAMETERS, but the root folder is not a config parameter, but a runtime parameter, so it is not listed there. I am running out of ideas here.

Share Improve this question asked Mar 24 at 12:02 Javier RamirezJavier Ramirez 4,0851 gold badge27 silver badges36 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Even if SHOW PARAMETERS does not list the db root folder itself, we can search for the cairo.sql.copy.work.root, which is a subfolder of the root folder by default. Note that this value can be changed, so if it is not the default, it might be outside the root folder.

We can execute this query to know both the current folder (defaults to /tmp under the db root), and also if it is the default location of now. If value_source returns default, you know you have the root folder.

select value, value_source from (show parameters) where property_path = 'cairo.sql.copy.work.root'

If we see the value source is not the default, but env or conf, this means the location has been defined via environment or server.conf values, and we cannot be sure about the root folder using this method.

An alternative in this case is parsing the startup log. The first lines of the log on startup will show something like this


2025-03-24T11:59:33.993921Z A server-main QuestDB 8.2.4-SNAPSHOT. Copyright (C) 2014-2025, all rights reserved.
2025-03-24T11:59:34.153961Z A server-main darwin-aarch64 [Vanilla,0, 64 bits, 8 processors]
2025-03-24T11:59:34.159261Z I server-main Web Console is up to date
2025-03-24T11:59:34.166166Z A server-main Server config: /opt/homebrew/var/questdb/conf/server.conf

And the startup sequence ends with something like

    ___                  _   ____  ____
    / _ \ _   _  ___  ___| |_|  _ \| __ )
   | | | | | | |/ _ \/ __| __| | | |  _ \
   | |_| | |_| |  __/\__ \ |_| |_| | |_) |
    \__\_\\__,_|\___||___/\__|____/|____/
                        www.questdb.io

    Web Console URL                 ILP Client Connection String

    http://192.168.64.1:9000        http::addr=192.168.64.1:9000;
    http://192.168.50.40:9000       http::addr=192.168.50.40:9000;
    http://127.0.0.1:9000           http::addr=127.0.0.1:9000;

QuestDB configuration files are in /opt/homebrew/var/questdb/conf


2025-03-24T11:59:34.879669Z A server-main enjoy

As you see on both extracts, the location of the root folder is printed out.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744254099a4565311.html

相关推荐

  • database - QuestDB root folder - Stack Overflow

    Is there any way of knowing which is the root folder of a running QuestDB instance? Programmatically if

    8天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信