Es gibt verschiedene Möglichkeiten, GUC-Parameter zu aktualisieren und hinzuzufügen. In diesem Dokument wird die grundlegendste Methode beschrieben, nämlich die Bearbeitung der Datei postgresql.conf. Weitere Informationen finden Sie in der PostgreSQL-Dokumentation unter Parameter festlegen.
So fügen Sie einen GUC-Parameter hinzu oder aktualisieren ihn, indem Sie die Datei postgresql.config bearbeiten:
Suchen Sie die postgresql.conf-Konfigurationsdatei für Ihre Installation von AlloyDB Omni.
Fügen Sie mit einem Texteditor ein Datenbankflag in postgresql.conf hinzu oder aktualisieren Sie ein vorhandenes Flag.
Nachdem Sie die Datenbankkennzeichnungen hinzugefügt oder bearbeitet haben, müssen Sie die postgresql.conf-Datei neu laden, damit die Änderungen wirksam werden. Wenn Sie beispielsweise AlloyDB Omni mit Docker installiert haben, führen Sie Folgendes aus, um Ihre Docker-Instanz neu zu starten und postgresql.conf neu zu laden:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eDatabase flags for AlloyDB Omni are configured by adding or updating Grand Unified Configuration (GUC) parameters in the \u003ccode\u003epostgresql.conf\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eThe primary method for modifying GUC parameters is through direct edits to the \u003ccode\u003epostgresql.conf\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eTo update a flag, locate the \u003ccode\u003epostgresql.conf\u003c/code\u003e file, use a text editor to add or modify the desired GUC parameter, such as \u003ccode\u003epassword.enforce_expiration = ON\u003c/code\u003e to enforce password expiration.\u003c/p\u003e\n"],["\u003cp\u003eAfter modifying \u003ccode\u003epostgresql.conf\u003c/code\u003e, the file must be reloaded for changes to take effect, which may involve restarting the Docker instance in some cases.\u003c/p\u003e\n"]]],[],null,["# Configure AlloyDB Omni database flags\n\nSelect a documentation version: 15.5.5keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/configure-database-flags)\n- [16.8.0](/alloydb/omni/16.8.0/docs/configure-database-flags)\n- [16.3.0](/alloydb/omni/16.3.0/docs/configure-database-flags)\n- [15.12.0](/alloydb/omni/15.12.0/docs/configure-database-flags)\n- [15.7.1](/alloydb/omni/15.7.1/docs/configure-database-flags)\n- [15.7.0](/alloydb/omni/15.7.0/docs/configure-database-flags)\n- [15.5.5](/alloydb/omni/15.5.5/docs/configure-database-flags)\n\n\u003cbr /\u003e\n\nTo configure a database flag for AlloyDB Omni, you add or update [Grand Unified Configuration (GUC)](https://www.postgresql.org/docs/current/config-setting.html) parameters in the `postgresql.conf` file.\n\n\u003cbr /\u003e\n\nAdd or update a GUC parameter\n-----------------------------\n\nThere are a few ways to update and add GUC parameters. This document covers the\nmost fundamental way, which is to edit your `postgresql.conf` file. For more\ninformation, see\n[Setting parameters](https://www.postgresql.org/docs/current/config-setting.html)\nin PostgreSQL documentation.\n\nTo add or update a GUC parameter by editing the `postgresql.config` file, do the\nfollowing:\n\n1. Locate the `postgresql.conf` configuration file for your installation of\n AlloyDB Omni.\n\n2. Use a text editor to add or update a database flag in `postgresql.conf`.\n\n For example, to\n [enforce password expiration](/alloydb/omni/15.5.5/docs/manage-password-policy#enforce-password-expiration),\n set the following flag in the `postgresql.conf` file: \n\n password.enforce_expiration = ON\n\n3. After your database flags are added or edited, reload the `postgresql.conf`\n file for the changes to take effect. For example, if you\n [installed AlloyDB Omni using Docker](/alloydb/omni/15.5.5/docs/quickstart#install-using-docker),\n run the following to restart your Docker instance and reload\n `postgresql.conf`:\n\n docker restart \u003cvar translate=\"no\"\u003eCONTAINER-NAME\u003c/var\u003e"]]