Ada beberapa cara untuk memperbarui dan menambahkan parameter GUC. Dokumen ini membahas cara paling mendasar, yaitu mengedit file postgresql.conf Anda. Untuk mengetahui informasi selengkapnya, lihat
Menetapkan parameter
dalam dokumentasi PostgreSQL.
Untuk menambahkan atau memperbarui parameter GUC dengan mengedit file postgresql.config, lakukan hal berikut:
Cari file konfigurasi postgresql.conf untuk penginstalan
AlloyDB Omni Anda.
Gunakan editor teks untuk menambahkan atau memperbarui flag database di postgresql.conf.
Setelah tanda database ditambahkan atau diedit, muat ulang postgresql.conf
file agar perubahan diterapkan. Misalnya, jika Anda
menginstal AlloyDB Omni menggunakan Docker,
jalankan perintah berikut untuk memulai ulang instance Docker dan memuat ulang
postgresql.conf:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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"]]