Meta functions

These functions provide instance-level information and table, column and partition information including metadata. They are particularly useful for learning useful information about your instance, including:

build

Arguments:

  • build() does not require arguments.

Return value:

Returns a string with the current QuestDB version and hash.

Examples:

SELECT build();
build
Build Information: QuestDB 7.3.5, JDK 17.0.7, Commit Hash 460b817b0a3705c5633619a8ef9efb5163f1569c

functions

Arguments:

  • functions() does not require arguments.

Return value:

Returns all available database functions.

Examples:

functions();
namesignaturesignature_translatedruntime_constanttype
oror(TT)or(boolean, boolean)FALSESTANDARD
andand(TT)and(boolean, boolean)FALSESTANDARD
notnot(T)not(boolean)FALSESTANDARD

query_activity

Arguments:

  • query_activity() does not require arguments.

Return value:

Returns metadata on running SQL queries, including columns such as:

  • query_id - identifier of the query that can be used with cancel query command or cancelQuery() function
  • worker_id - identifier of worker thread that initiated query processing. Note that many multithreaded queries also run on other workers
  • worker_pool - name of worker pool used to execute the query
  • username - name of user executing the query
  • query_start - timestamp of when query started
  • state_change - timestamp of latest query state change, such as a cancellation
  • state - state of running query, can be active or cancelled
  • query - text of sql query

Examples:

SELECT * FROM query_activity();
query_idworker_idworker_poolusernamequery_startstate_changestatequery
621795sharedbob2024-01-09T10:03:05.557397Z2024-01-09T10:03:05.557397activeselect * from query_activity()
577776sharedbob2024-01-09T08:58:55.988017Z2024-01-09T08:58:55.988017ZactiveSELECT symbol,approx_percentile(price, 50, 2) from trades

memory_metrics

Arguments:

  • memory_metrics() does not require arguments.

Return value:

Returns granular memory metrics.

Examples:

memory_metrics();
memory_tagbytes
TOTAL_USED142624730
RSS328609792
MMAP_DEFAULT196728
NATIVE_DEFAULT256
MMAP_O30
NATIVE_O396

reader_pool

Arguments:

  • reader_pool() does not require arguments.

Return value:

Returns information about the current state of the reader pool in QuestDB. The reader pool is a cache of table readers that are kept open to speed up subsequent reads from the same table. The returned information includes the table name, the ID of the thread that currently owns the reader, the timestamp of the last time the reader was accessed, and the current transaction ID with which the reader is associated.

Examples:

SELECT * FROM reader_pool();
table_nameowner_thread_idlast_access_timestampcurrent_txn
sensorsnull2023-12-01T19:28:14.311703Z1

writer_pool

Arguments:

  • writer_pool() does not require arguments.

Return value:

Returns information about the current state of the writer pool in QuestDB. The writer pool is a cache of table writers that are kept open to speed up subsequent writes to the same table. The returned information includes the table name, the ID of the thread that currently owns the writer, the timestamp of the last time the writer was accessed, and the reason for the ownership.

Examples:

SELECT * FROM writer_pool();
table_nameowner_thread_idlast_access_timestampownership_reason
sys.column_versions_purge_log12023-12-01T18:50:03.412468ZQuestDB system
telemetry_config12023-12-01T18:50:03.470604ZtelemetryConfig
telemetry12023-12-01T18:50:03.464501Ztelemetry
sys.telemetry_wal12023-12-01T18:50:03.467924Ztelemetry
example_tablenull2023-12-01T20:33:33.270984Znull

current database, schema, or user

current_database(), current_schema(), and current_user() are standard SQL functions that return information about the current database, schema, schemas, and user, respectively.

-- Get the current database
SELECT current_database();

-- Get the current schema
SELECT current_schema();

-- Get the current user
SELECT current_user();

Each of these functions returns a single value, so you can use them in a SELECT statement without any arguments.

tables

tables() returns metadata and real-time statistics for all tables in the database, including write activity, WAL status, and performance metrics.

Arguments:

  • tables() does not require arguments.

Return value:

Returns a table with the following columns:

Basic table information

ColumnTypeDescription
idINTInternal table ID
table_nameSTRINGTable name
designatedTimestampSTRINGName of the designated timestamp column, or null
partitionBySTRINGPartition strategy: NONE, HOUR, DAY, WEEK, MONTH, YEAR
walEnabledBOOLEANWhether WAL (Write-Ahead Log) is enabled
dedupBOOLEANWhether deduplication is enabled
ttlValueINTTTL (Time-To-Live) value
ttlUnitSTRINGTTL unit: HOUR, DAY, WEEK, MONTH, YEAR
matViewBOOLEANWhether this is a materialized view
directoryNameSTRINGDirectory name on disk (includes (->) suffix for symlinks)
maxUncommittedRowsINTTable's maxUncommittedRows setting
o3MaxLagLONGTable's o3MaxLag setting in microseconds
note

(->) means the table was created using the IN VOLUME clause.

Table metrics (table_* prefix)

ColumnTypeDescription
table_suspendedBOOLEANWhether a WAL table is suspended (false for non-WAL tables)
table_row_countLONGApproximate row count at last tracked write
table_max_timestampTIMESTAMPApproximate timestamp of last TableWriter commit
table_txnLONGTableWriter transaction number at last tracked write
table_memory_pressure_levelINTMemory pressure: 0 (none), 1 (reduced parallelism), 2 (backoff). null for non-WAL
table_write_amp_countLONGTotal write amplification samples recorded
table_write_amp_p50DOUBLEMedian write amplification ratio
table_write_amp_p90DOUBLE90th percentile ratio
table_write_amp_p99DOUBLE99th percentile ratio
table_write_amp_maxDOUBLEMaximum ratio
table_merge_rate_countLONGTotal merge throughput samples recorded
table_merge_rate_p50LONGMedian throughput in rows/second
table_merge_rate_p90LONGThroughput that 90% of jobs exceeded (slowest 10%)
table_merge_rate_p99LONGThroughput that 99% of jobs exceeded (slowest 1%)
table_merge_rate_maxLONGMaximum throughput in rows/second

Write amplification measures O3 (out-of-order) merge overhead as physicalRowsWritten / logicalRows. A ratio of 1.0 means no amplification. Higher values indicate O3 merge overhead.

note

Merge rate P99 shows the lowest throughput (worst performance), not the highest.

WAL metrics (wal_* prefix)

ColumnTypeDescription
wal_pending_row_countLONGRows written to WAL but not yet applied to table
dedup_row_count_since_startLONGCumulative rows removed by deduplication (since server start)
wal_txnLONGWAL sequencer transaction number (WAL tables only)
wal_max_timestampTIMESTAMPMax data timestamp from last WAL commit (WAL tables only)
wal_tx_countLONGTotal WAL transactions recorded (since server start)
wal_tx_size_p50LONGMedian transaction size in rows
wal_tx_size_p90LONG90th percentile transaction size in rows
wal_tx_size_p99LONG99th percentile transaction size in rows
wal_tx_size_maxLONGMaximum transaction size in rows

Replica metrics (replica_* prefix)

These columns are populated on replicas only via replication download tracking:

ColumnTypeDescription
replica_batch_countLONGTotal download batches recorded
replica_batch_size_p50LONGMedian batch size in rows
replica_batch_size_p90LONG90th percentile batch size
replica_batch_size_p99LONG99th percentile batch size
replica_batch_size_maxLONGMaximum batch size
replica_more_pendingBOOLEANtrue if the last download batch was limited and more data is available

On primary instances, these columns will be 0 or false.

Data precision and limitations

These values are approximations, not precise real-time metrics:

  • Null when not tracked: Values are null for tables not written to since server start, or evicted from the tracker
  • Writer stats updated on pool return: table_row_count, table_max_timestamp, table_txn are captured when TableWriter returns to the pool, not on every commit. A writer held for a long time won't update these columns until released.
  • WAL stats updated in real-time:
    • On WAL commit: wal_pending_row_count (incremented), wal_txn, wal_max_timestamp, wal_tx_size_* histogram
    • On WAL apply: wal_pending_row_count (decremented), dedup_row_count_since_start, table_write_amp_*, table_merge_rate_*
  • LRU eviction: Tracker maintains bounded memory (default 1000 tables). Least recently written tables are evicted when capacity is exceeded
  • Startup hydration: Values are hydrated from table metadata (TxReader) on startup, but diverge as writes occur

Non-WAL tables: wal_txn, wal_max_timestamp, wal_pending_row_count, dedup_row_count_since_start, table_memory_pressure_level, and histogram columns are null or 0.

WAL tables: All columns populated when tracked. wal_max_timestamp reflects the max data timestamp from the WAL transaction, not wall-clock time.

Configuration

PropertyDefaultDescription
cairo.recent.write.tracker.capacity1000Maximum number of tables tracked

Tables exceeding this capacity are evicted based on least recent write activity.

Examples:

List all tables
tables();
idtable_namedesignatedTimestamppartitionBywalEnableddirectoryNamededupttlValuettlUnitmatView
1my_tabletsDAYfalsemy_tablefalse0HOURfalse
2device_datanullNONEfalsedevice_datafalse0HOURfalse
3short_livednullHOURfalseshort_lived (->)false1HOURfalse
All tables with a daily partitioning strategy
tables() WHERE partitionBy = 'DAY';
idtable_namedesignatedTimestamppartitionBywalEnableddirectoryNamededupttlValuettlUnitmatView
1my_tabletsDAYtruemy_tablefalse0HOURfalse
Recently written tables
SELECT table_name, table_row_count, table_max_timestamp
FROM tables()
WHERE table_max_timestamp IS NOT NULL
ORDER BY table_max_timestamp DESC
LIMIT 10;
WAL apply lag
SELECT
table_name,
wal_txn - table_txn AS pending_txns,
wal_pending_row_count
FROM tables()
WHERE walEnabled
AND wal_txn IS NOT NULL
AND wal_txn > table_txn
ORDER BY pending_txns DESC;
Suspended tables
SELECT table_name, table_suspended, table_memory_pressure_level
FROM tables()
WHERE walEnabled AND table_suspended;
Memory pressure
SELECT table_name, table_memory_pressure_level
FROM tables()
WHERE table_memory_pressure_level > 0
ORDER BY table_memory_pressure_level DESC;
Deduplication activity
SELECT table_name, dedup_row_count_since_start, wal_tx_count,
dedup_row_count_since_start * 100.0 / NULLIF(wal_tx_count, 0) AS dedup_ratio
FROM tables()
WHERE dedup_row_count_since_start > 0
ORDER BY dedup_row_count_since_start DESC;
Large transactions
SELECT table_name, wal_tx_count, wal_tx_size_p50, wal_tx_size_p99, wal_tx_size_max
FROM tables()
WHERE walEnabled AND wal_tx_count > 0
ORDER BY wal_tx_size_p99 DESC;
High variance (spiky workloads)
SELECT table_name, wal_tx_size_p50, wal_tx_size_max,
wal_tx_size_max / NULLIF(wal_tx_size_p50, 0) AS spike_ratio
FROM tables()
WHERE walEnabled AND wal_tx_size_max > wal_tx_size_p50 * 10;
High write amplification (O3 overhead)
SELECT table_name,
table_write_amp_count,
table_write_amp_p50,
table_write_amp_p99,
table_write_amp_max
FROM tables()
WHERE walEnabled
AND table_write_amp_p50 > 2.0
ORDER BY table_write_amp_p99 DESC;
Slow merge performance
SELECT table_name,
table_merge_rate_p99 AS slowest_throughput,
table_merge_rate_p50 AS median_throughput,
table_merge_rate_max AS best_throughput
FROM tables()
WHERE walEnabled
AND table_merge_rate_count > 0
ORDER BY table_merge_rate_p99 ASC;
Replica download statistics
SELECT table_name, replica_batch_count, replica_batch_size_p50,
replica_batch_size_p90, replica_batch_size_max, replica_more_pending
FROM tables()
WHERE replica_batch_count > 0
ORDER BY replica_batch_count DESC;
Table configuration overview
SELECT table_name,
partitionBy,
walEnabled,
dedup,
maxUncommittedRows,
o3MaxLag / 1000000 AS o3MaxLagSeconds
FROM tables()
WHERE walEnabled
ORDER BY table_name;
Health dashboard query
SELECT
table_name,
table_row_count,
wal_pending_row_count,
CASE
WHEN table_suspended THEN 'SUSPENDED'
WHEN table_memory_pressure_level = 2 THEN 'BACKOFF'
WHEN table_memory_pressure_level = 1 THEN 'PRESSURE'
ELSE 'OK'
END AS status,
wal_txn - table_txn AS lag_txns,
table_write_amp_p50 AS write_amp,
table_merge_rate_p99 AS slowest_merge
FROM tables()
WHERE walEnabled
ORDER BY
table_suspended DESC,
table_memory_pressure_level DESC,
wal_pending_row_count DESC;

table_storage

table_storage() - Returns information about the storage and structure of all user tables and materialized views in the database.

Provides detailed storage information about all user tables and materialized views within QuestDB. It returns one row per table, including information about partitioning, row counts, and disk usage.

  • The table_storage() function excludes system tables; it only lists user-created tables.
  • The diskSize value represents the total size of all files associated with the table on disk, including data, index, and metadata files.
  • The partitionBy column indicates the partitioning strategy used for the table. It can be NONE if the table is not partitioned.

Return values:

The function returns the following columns:

  • tableName (string): The name of the table or materialized view.
  • walEnabled (boolean): Indicates whether Write-Ahead Logging (WAL) is enabled for the table.
  • partitionBy (string): The partitioning type of the table (e.g., NONE, DAY, MONTH, YEAR, etc.).
  • partitionCount (long): The number of partitions the table has.
  • rowCount (long): The total number of rows in the table.
  • diskSize (long): The total disk space used by the table, in bytes.

Examples:

Retrieve storage information for all tables.

Checking our demo tablesDemo this query
SELECT * FROM table_storage();
  • The query retrieves storage details for all tables in the database.
  • The diskSize column shows the total disk space used by each table in bytes.
tableNamewalEnabledpartitionBypartitionCountrowCountdiskSize
tripstrueMONTH1261634599313261536158948
AAPL_orderbooktrueHOUR1630248782149403527
weatherfalseNONE11376279972598
tradestrueDAY954100084830832764798760
ethblocks_jsontrueDAY33282068836428311960478

Filter tables with WAL enabled.

WAL only tablesDemo this query
SELECT tableName, rowCount, diskSize
FROM table_storage()
WHERE walEnabled = true;
tableNamerowCountdiskSize
trips1634599313261536158948
AAPL_orderbook30248782149403527
trades100085025532764804264
ethblocks_json2068836428311960478

Show tables partitioned by HOUR.

Show tables partitioned by hourDemo this query
SELECT tableName, partitionCount, rowCount
FROM table_storage()
WHERE partitionBy = 'HOUR';

wal_tables

note

For monitoring and observability, use tables() instead. tables() provides all the same information plus additional metrics (pending rows, memory pressure, deduplication stats, throughput histograms), and is fully in-memory. wal_tables() reads from disk and is less suitable for frequent polling.

wal_tables() returns the WAL status for all WAL tables or materialized views in the database.

Arguments:

  • wal_tables() does not require arguments.

Return value:

Returns a table including the following information:

  • name - table or materialized view name
  • suspended - suspended status flag
  • writerTxn - the last committed transaction in TableWriter (equivalent to table_txn in tables())
  • writerLagTxnCount - the number of transactions that are kept invisible when writing to the table; these transactions will be eventually moved to the table data and become visible for readers (equivalent to wal_txn - table_txn)
  • sequencerTxn - the last committed transaction in the sequencer (equivalent to wal_txn in tables())

Examples:

List all tables
wal_tables();
namesuspendedwriterTxnwriterLagTxnCountsequencerTxn
sensor_walfalse214
weather_walfalse303
test_waltrue719

table_columns

table_columns('tableName') returns the schema of a table or a materialized view.

Arguments:

  • tableName is the name of an existing table or materialized view as a string.

Return value:

Returns a table with the following columns:

  • column - name of the available columns in the table
  • type - type of the column
  • indexed - if indexing is applied to this column
  • indexBlockCapacity - how many row IDs to store in a single storage block on disk
  • symbolCached - whether this symbol column is cached
  • symbolCapacity - how many distinct values this column of symbol type is expected to have
  • designated - if this is set as the designated timestamp column for this table
  • upsertKey - if this column is a part of UPSERT KEYS list for table deduplication

For more details on the meaning and use of these values, see the CREATE TABLE documentation.

Examples:

Get all columns in a table
table_columns('my_table');
columntypeindexedindexBlockCapacitysymbolCachedsymbolCapacitydesignatedupsertKey
symbSYMBOLtrue1048576false256falsefalse
priceDOUBLEfalse0false0falsefalse
tsTIMESTAMPfalse0false0truefalse
sVARCHARfalse0false0falsefalse
Get designated timestamp column
SELECT column, type, designated FROM table_columns('my_table') WHERE designated = true;
columntypedesignated
tsTIMESTAMPtrue
Get the count of column types
SELECT type, count() FROM table_columns('my_table');
typecount
SYMBOL1
DOUBLE1
TIMESTAMP1
VARCHAR1

table_partitions

table_partitions('tableName') returns information for the partitions of a table or a materialized view with the option to filter the partitions.

Arguments:

  • tableName is the name of an existing table or materialized view as a string.

Return value:

Returns a table with the following columns:

  • index - INTEGER, index of the partition (NaN when the partition is not attached)
  • partitionBy - STRING, one of NONE, HOUR, DAY, WEEK, MONTH and YEAR
  • name - STRING, name of the partition, e.g. 2023-03-14, 2023-03-14.detached, 2023-03-14.attachable
  • minTimestamp - LONG, min timestamp of the partition (NaN when the table is not partitioned)
  • maxTimestamp - LONG, max timestamp of the partition (NaN when the table is not partitioned)
  • numRows - LONG, number of rows in the partition
  • diskSize - LONG, size of the partition in bytes
  • diskSizeHuman - STRING, size of the partition meant for humans to read (same output as function size_pretty)
  • readOnly - BOOLEAN, true if the partition is attached via soft link
  • active - BOOLEAN, true if the partition is the last partition, and whether we are writing to it (at least one record)
  • attached - BOOLEAN, true if the partition is attached
  • detached - BOOLEAN, true if the partition is detached (name of the partition will contain the .detached extension)
  • attachable - BOOLEAN, true if the partition is detached and can be attached (name of the partition will contain the .attachable extension)

Examples:

Create table my_table
CREATE TABLE my_table AS (
SELECT
rnd_symbol('EURO', 'USD', 'OTHER') symbol,
rnd_double() * 50.0 price,
rnd_double() * 20.0 amount,
to_timestamp('2023-01-01', 'yyyy-MM-dd') + x * 6 * 3600 * 100000L timestamp
FROM long_sequence(700)
), INDEX(symbol capacity 32) TIMESTAMP(timestamp) PARTITION BY WEEK;
Get all partitions from my_table
table_partitions('my_table');
indexpartitionBynameminTimestampmaxTimestampnumRowsdiskSizediskSizeHumanreadOnlyactiveattacheddetachedattachable
0WEEK2022-W522023-01-01 00:36:00.02023-01-01 23:24:00.0399830496.0 KiBfalsefalsetruefalsefalse
1WEEK2023-W012023-01-02 00:00:00.02023-01-08 23:24:00.02809830496.0 KiBfalsefalsetruefalsefalse
2WEEK2023-W022023-01-09 00:00:00.02023-01-15 23:24:00.02809830496.0 KiBfalsefalsetruefalsefalse
3WEEK2023-W032023-01-16 00:00:00.02023-01-18 12:00:00.01018390246480.0 MiBfalsetruetruefalsefalse
Get size of a table in disk
SELECT size_pretty(sum(diskSize)) FROM table_partitions('my_table');
size_pretty
80.3 MB
Get active partition of a table
SELECT * FROM table_partitions('my_table') WHERE active = true;
indexpartitionBynameminTimestampmaxTimestampnumRowsdiskSizediskSizeHumanreadOnlyactiveattacheddetachedattachable
3WEEK2023-W032023-01-16 00:00:00.02023-01-18 12:00:00.01018390246480.0 MiBfalsetruetruefalsefalse

materialized_views

materialized_views() returns the list of all materialized views in the database.

Arguments:

  • materialized_views() does not require arguments.

Return value:

Returns a table including the following information:

  • view_name - materialized view name
  • refresh_type - refresh strategy type
  • base_table_name - base table name
  • last_refresh_start_timestamp - last time when an incremental refresh for the view was started
  • last_refresh_finish_timestamp - last time when an incremental refresh for the view finished
  • view_sql - query used to populate view data
  • view_table_dir_name - view directory name
  • invalidation_reason - message explaining why the view was marked as invalid
  • view_status - view status: 'valid', 'refreshing', or 'invalid'
  • refresh_base_table_txn - the last base table transaction used to refresh the materialized view
  • base_table_txn - the last committed transaction in the base table
  • refresh_limit_value - how many units back in time the refresh limit goes
  • refresh_limit_unit - how long each unit is
  • timer_start - start date for the scheduled refresh timer
  • timer_interval_value - how many interval units between each refresh
  • timer_interval_unit - how long each unit is

Examples:

List all materialized views
materialized_views();
view_namerefresh_typebase_table_namelast_refresh_start_timestamplast_refresh_finish_timestampview_sqlview_table_dir_nameinvalidation_reasonview_statusrefresh_base_table_txnbase_table_txnrefresh_limit_valuerefresh_limit_unittimer_starttimer_interval_valuetimer_interval_unit
trades_OHLC_15mimmediatetrades2025-05-30T16:40:37.562421Z2025-05-30T16:40:37.568800ZSELECT timestamp, symbol, first(price) AS open, max(price) as high, min(price) as low, last(price) AS close, sum(amount) AS volume FROM trades SAMPLE BY 15mtrades_OHLC_15m~27nullvalid55141609551416090nullnull0null
trades_latest_1dimmediatetrades2025-05-30T16:40:37.554274Z2025-05-30T16:40:37.562049ZSELECT timestamp, symbol, side, last(price) AS price, last(amount) AS amount, last(timestamp) as latest FROM trades SAMPLE BY 1dtrades_latest_1d~28nullvalid55141609551416090nullnull0null

views

views() returns the list of all views in the database.

Arguments:

  • views() does not require arguments.

Return value:

Returns a table including the following information:

  • view_name - view name
  • view_sql - query used to define the view (without CREATE VIEW wrapper)
  • view_table_dir_name - internal directory name
  • invalidation_reason - message explaining why the view was marked as invalid, empty if valid
  • view_status - view status: valid or invalid
  • view_status_update_time - timestamp of last status change

Examples:

List all views
views();
view_nameview_sqlview_table_dir_nameinvalidation_reasonview_statusview_status_update_time
hourly_summarySELECT ts, symbol, sum(qty) FROM trades SAMPLE BY 1hhourly_summary~1valid2025-05-30T10:15:00.000000Z
price_viewSELECT symbol, last(price) FROM trades SAMPLE BY 1dprice_view~2valid2025-05-30T10:20:00.000000Z
Find invalid views
SELECT view_name, invalidation_reason
FROM views()
WHERE view_status = 'invalid';
List views ordered by name
SELECT * FROM views() ORDER BY view_name;

version/pg_catalog.version

version() or pg_catalog.version() returns the supported version of the PostgreSQL Wire Protocol.

Arguments:

  • version() or pg_catalog.version() does not require arguments.

Return value:

Returns string.

Examples:

SELECT version();

--The above equals to:

SELECT pg_catalog.version();
version
PostgreSQL 12.3, compiled by Visual C++ build 1914, 64-bit, QuestDB

hydrate_table_metadata('table1', 'table2' ...)

`hydrate_table_metadata' re-reads table metadata from disk to update the static metadata cache.

warning

This function should only be used when directed by QuestDB support. Misuse could cause corruption of the metadata cache, requiring the database to be restarted.

Arguments:

A variable list of strings, corresponding to table names.

Alternatively, a single asterisk, '*', representing all tables.

Return value:

Returns boolean. true if successful, false if unsuccessful.

Examples:

Simply pass table names as arguments to the function.

SELECT hydrate_table_metadata('trades', 'trips');
hydrate_table_metadata
true

If you want to re-read metadata for all user tables, simply use an asterisk:

SELECT hydrate_table_metadata('*');

flush_query_cache()

`flush_query_cache' invalidates cached query execution plans.

Arguments:

  • flush_query_cache() does not require arguments.

Return value:

Returns boolean. true if successful, false if unsuccessful.

Examples:

Flush cached query execution plans
SELECT flush_query_cache();

reload_config()

reload_config' reloads server configuration file's contents (server.conf`) without server restart. The list of reloadable settings can be found here.

Arguments:

  • reload_config() does not require arguments.

Return value:

Returns boolean. true if any configuration properties were reloaded, false if none were reloaded.

Examples:

Edit server.conf and run reload_config:

Reload server configuration
SELECT reload_config();