This topic describes the parameter settings of PolarDB for PostgreSQL(Compatible with Oracle). You can modify the parameters in the PolarDB console or on clients.
Modify parameters in the console
- Log on to the PolarDB console.
- In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.
- Find the cluster and click the cluster ID.
- In the left-side navigation pane, choose .
- In the Current Value column on the page that appears, change the values of one or more parameters. Then, click Submit Changes.
- In the Save Changes dialog box, click OK.
For more information, see Configure cluster parameters.
Modify parameters on clients
You can execute the following statements to modify parameters on the clients.
Statement | Description |
alter database | 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. |
alter role | 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. |
set | Modifies session-level parameters. The new parameter settings take effect for only 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)