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.

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.

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.

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

Help us make this doc better!