Select a documentation version: <button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">16.8.0</button>

- [Current (18.4.0)](https://docs.cloud.google.com/alloydb/omni/kubernetes/current/docs/configure-database-flags.md.txt)
- [18.4.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/18.4.0/docs/configure-database-flags.md.txt)
- [18.3.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/18.3.0/docs/configure-database-flags.md.txt)
- [18.1.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/18.1.0/docs/configure-database-flags.md.txt)
- [17.10.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/17.10.0/docs/configure-database-flags.md.txt)
- [17.9.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/17.9.0/docs/configure-database-flags.md.txt)
- [17.7.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/17.7.0/docs/configure-database-flags.md.txt)
- [17.5.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/17.5.0/docs/configure-database-flags.md.txt)
- [16.14.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/16.14.0/docs/configure-database-flags.md.txt)
- [16.13.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/16.13.0/docs/configure-database-flags.md.txt)
- [16.11.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/16.11.0/docs/configure-database-flags.md.txt)
- [16.9.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/16.9.0/docs/configure-database-flags.md.txt)
- [16.8.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/16.8.0/docs/configure-database-flags.md.txt)
- [16.3.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/16.3.0/docs/configure-database-flags.md.txt)
- [15.18.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/15.18.0/docs/configure-database-flags.md.txt)
- [15.17.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/15.17.0/docs/configure-database-flags.md.txt)
- [15.15.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/15.15.0/docs/configure-database-flags.md.txt)
- [15.13.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/15.13.0/docs/configure-database-flags.md.txt)
- [15.12.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/15.12.0/docs/configure-database-flags.md.txt)
- [15.7.1](https://docs.cloud.google.com/alloydb/omni/kubernetes/15.7.1/docs/configure-database-flags.md.txt)
- [15.7.0](https://docs.cloud.google.com/alloydb/omni/kubernetes/15.7.0/docs/configure-database-flags.md.txt)
- [15.5.5](https://docs.cloud.google.com/alloydb/omni/kubernetes/15.5.5/docs/configure-database-flags.md.txt)

<br />

To configure a database parameter for AlloyDB Omni, you can update [Grand Unified Configuration (GUC) parameters](https://www.postgresql.org/docs/current/config-setting.html) in the database cluster manifest (`DBCluster`) for environments running AlloyDB Omni on [a Kubernetes cluster](https://docs.cloud.google.com/alloydb/omni/kubernetes/16.8.0/docs/deploy-kubernetes.md.txt). For a list of supported flags, see [Supported database flags](https://docs.cloud.google.com/alloydb/omni/kubernetes/16.8.0/docs/reference/database-flags.md.txt).

## 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:

```yaml
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`.

> [!NOTE]
> **Note:** Repeat the `PARAMETER_NAME: "PARAMETER_VALUE"` line of code for each name-value pair that you have.

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:

```bash
kubectl patch dbclusters.alloydbomni.dbadmin.goog dbcluster-sample -p '{"spec":{"primarySpec":{"parameters": {"PARAMETER_NAME": "PARAMETER_VALUE"}}}}' --type=merge
```

> [!NOTE]
> **Note:** For parameters that require a restart, updating parameters restarts the database automatically.

Parameter settings are located in the `status` part of the `currentParameters` field.

To view database parameters, run the following command:

```bash
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.