Configure AlloyDB Omni database flags

To configure a database flag for AlloyDB Omni, you add or update Grand Unified Configuration (GUC) parameters in the postgresql.conf file.

Add or update a GUC parameter

There are a few ways to update and add GUC parameters. This document covers the most fundamental way, which is to edit your postgresql.conf file. For more information, see Setting parameters in PostgreSQL documentation.

To add or update a GUC parameter by editing the postgresql.config file, do the following:

  1. Locate the postgresql.conf configuration file for your installation of AlloyDB Omni.

  2. Use a text editor to add or update a database flag in postgresql.conf.

    For example, to enforce password expiration, set the following flag in the postgresql.conf file:

    password.enforce_expiration = ON
    
  3. After your database flags are added or edited, reload the postgresql.conf file for the changes to take effect. For example, if you installed AlloyDB Omni using Docker, run the following to restart your Docker instance and reload postgresql.conf:

    docker restart CONTAINER-NAME