This topic describes how to modify the parameters of PolarDB in the PolarDB console or on a client.
Modify parameters in the PolarDB console
Log on to the PolarDB console.
In the top navigation bar, select the region in which the cluster that you want to manage is deployed.
Find the cluster and click its ID.
In the left-side navigation pane, choose .
Click Modify Parameter.
Modify the cluster parameters and then click Submit Changes.
In the message that appears, click OK.
For more information, see Configure cluster parameters.
Modify parameters on a client
The following table describes the commands that you can run to modify parameters on a client.
Command | Description |
| Modifies database-level parameters. You can specify different parameter values for different databases. After you modify the parameters, you must reconnect to the session to make new parameter settings to take effect. |
| Modifies user-level parameters. You can specify different parameter values for different users. The user-level parameter settings override database-level parameter settings. After you modify the parameters, you must reconnect to the session to make new parameter settings to take effect. |
| Modifies session-level parameters. The new parameter settings take effect only for the current session. If the session is disconnected, the new parameter settings become invalid. |
Examples:
alter database
test1=> alter database test1 set vacuum_cost_delay =10; ALTER DATABASE
alter role
test1=> alter role test1 pg_db_role_setting; setdatabase | setrole | setcofig ------------+---------+------------------------ 41891 | 0 | {vacuum_cost_delay=10} 0 | 41284 | {random_page_cost=10} (2 rows)
set
test1=> set random_page_cost=100; SET test1=> show random_page_cost; random_page_cost ------------------ 100 (1 row)