Esistono diversi modi per aggiornare e aggiungere i parametri GUC. Questo documento descrive il modo più fondamentale, ovvero modificare il file postgresql.conf. Per saperne di più, consulta la sezione Impostazione dei parametri nella documentazione di PostgreSQL.
Per aggiungere o aggiornare un parametro GUC modificando il file postgresql.config, procedi nel
seguente modo:
Individua il file di configurazione postgresql.conf per l'installazione di
AlloyDB Omni.
Utilizza un editor di testo per aggiungere o aggiornare un flag di database in postgresql.conf.
Dopo aver aggiunto o modificato i flag del database, ricarica il file postgresql.conf
affinché le modifiche vengano applicate. Ad esempio, se hai
installato AlloyDB Omni utilizzando Docker,
esegui il comando seguente per riavviare l'istanza Docker e ricaricare
postgresql.conf:
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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"]]