Help Center> GaussDB> Distributed_3.x> SQL Reference> SQL Syntax> ALTER GLOBAL CONFIGURATION
Updated on 2024-05-07 GMT+08:00

ALTER GLOBAL CONFIGURATION

Description

Adds or modifies the key-value of the gs_global_config system catalog. You can modify an existing parameter or add a new one.

Precautions

  • Only the initial database user can run this command.
  • The keyword cannot be changed to weak_password.

Syntax

ALTER GLOBAL CONFIGURATION with(paraname=value, paraname=value...);

Parameters

  • name

    Parameter name, which is of the text type. The value cannot be weak_password or undostoragetype.

  • value

    Parameter value, which is of the text type.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
-- Insert.
gaussdb=# ALTER GLOBAL CONFIGURATION with(redis_is_ok = true);
-- Query.
gaussdb=# SELECT * FROM gs_global_config;
      name       | value
-----------------+-------
 buckets_len     | 16384
 undostoragetype | page
 redis_is_ok     | true
(3 rows)

-- Modify.
gaussdb=# ALTER GLOBAL CONFIGURATION with(redis_is_ok = false);
-- Query.
gaussdb=# SELECT * FROM gs_global_config;
      name       | value
-----------------+-------
 buckets_len     | 16384
 undostoragetype | page
 redis_is_ok     | false
(3 rows)

-- Delete.
gaussdb=# DROP GLOBAL CONFIGURATION redis_is_ok;
-- Query.
gaussdb=# SELECT * FROM gs_global_config;
      name       | value
-----------------+-------
 buckets_len     | 16384
 undostoragetype | page
(2 rows)