DBCluster) for environments running
AlloyDB Omni on
a Kubernetes cluster. For a list of supported
flags, see
Supported database flags.
Update a parameter in AlloyDB Omni on a Kubernetes cluster
You can configure database parameters using the parameters field in the primarySpec section of your database cluster manifest:
spec:
primarySpec:
parameters:
"PARAMETER_NAME": "PARAMETER_VALUE"
...
Replace the following:
PARAMETER_NAME: the name of the parameter—for example,autovacuum.PARAMETER_VALUE: the value of the parameter—for example,off.
Some parameters require you to restart your cluster for the changes to take effect. You can obtain a list of parameters that require a restart from pg_catalog.pg_settings. Any parameter with pg_catalog.pg_settings.context = 'postmaster' requires a restart.
To update database parameters, run the following command:
kubectl patch dbclusters.alloydbomni.dbadmin.goog dbcluster-sample -p '{"spec":{"primarySpec":{"parameters": {"PARAMETER_NAME": "PARAMETER_VALUE"}}}}' --type=mergeParameter settings are located in the status part of the currentParameters field.
To view database parameters, run the following command:
kubectl get dbclusters.alloydbomni.dbadmin.goog dbcluster-sample -o jsonpath={.status.primary.currentParameters}The output is similar to the following:
{"autovacuum":"off","max_connections":"3000"}
If AlloyDB Omni can't apply your requested updates, then the output lists the current and requested values separately. For example, this difference can occur if you apply a nonexistent parameter or set a string value for an integer parameter.
Audit database parameters using the web UI
You can audit active database flags and identify customized parameters that differ from default engine values using the Database flags page in the AlloyDB Omni web user interface.
To audit database parameters in the web UI, complete the following steps:
- Connect to the web UI and select your cluster.
- In the navigation menu, click Database flags.
- Use the following controls to search and filter parameters:
- Search for flags: Enter a keyword (for example,
max) to filter parameters by name. - Show modified flags: Select this checkbox to display only parameters whose active values differ from their default engine values. Customized values are also highlighted in yellow in the Current value column.
- Collapse all or Expand all: Collapse or expand the parameter category groups (such as Google AlloyDB Options, Client Connection Defaults / Locale and Formatting, Client Connection Defaults / Other Defaults, and Client Connection Defaults / Shared Library Preloading).
- Search for flags: Enter a keyword (for example,
- Review the parameter table columns within each category group:
- Setting: The name of the database parameter.
- Type: The data type of the parameter (for example,
INTEGER). - Current value: The active value of the parameter on the instance (highlighted in yellow if modified from the default).
- Default value: The default engine value for the parameter.
- Restart required: Indicates whether modifying the parameter requires a database restart (
trueorfalse). - Source: The configuration source of the current value (for example,
default).