Skip to main content

System administration functions

This page lists both RisingWave system administration functions and PostgreSQL system administration functions that are supported in RisingWave.

current_setting()

Returns the current value of a specified runtime parameter. This function corresponds to the SQL command SHOW.

Example
SELECT current_setting ('server_version');
---------RESULT
current_setting
-----------------
8.3.0
(1 row)

You can use the SHOW ALL command to get the complete list of runtime parameters and corresponding descriptions.

set_config()

Syntax
set_config ( setting_name text, new_value text, is_local boolean )text

Sets the parameter setting_name to new_value, and returns that value. If is_local is true, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use false instead. This function corresponds to the SQL command SET.

Example
SELECT set_config('rw_implicit_flush', 'true', false);
-------
true

pg_indexes_size('table_name')

Returns the total size of all indexes associated with a particular table in bytes.

Example
SELECT pg_indexes_size('t1');
---------RESULT
pg_indexes_size
-----------------
0
(1 row)

pg_table_size('table_name')

Returns the size of a table in bytes.

Example
SELECT pg_table_size('t1');
---------RESULT
pg_table_size
---------------
240
(1 row)

pg_stat_get_numscans('table_name')

Returns the total number of scans (sequential and index scans) performed on a specified table since the server was started.

Example
SELECT pg_stat_get_numscans('my_table');
pg_stat_get_numscans
----------------------
0
(1 row)
note

This is a dummy function intended for compatibility with third-party tools. We keep it here only for reference and it will be eventually removed. Please do not use it in production environments or any important tasks.

Help us make this doc better!

Was this page helpful?

Happy React is loading...