VM에서 AlloyDB Omni를 실행하는 환경의 postgresql.conf 파일입니다.
Kubernetes 클러스터에서 AlloyDB Omni를 실행하는 환경의 데이터베이스 클러스터 매니페스트입니다.
컨테이너화된 AlloyDB Omni에서 파라미터 업데이트
VM에서 실행되는 AlloyDB Omni에서 다음과 같이 postgresql.conf 파일을 수정하여 매개변수를 업데이트할 수 있습니다.
AlloyDB Omni 설치의 postgresql.conf 구성 파일을 찾습니다.
텍스트 편집기를 사용하여 postgresql.conf에 데이터베이스 플래그를 추가하거나 업데이트합니다.
예를 들어 비밀번호 만료를 시행하려면 postgresql.conf 파일에서 다음 플래그를 설정합니다.
password.enforce_expiration=ON
데이터베이스 플래그를 추가하거나 수정한 후 변경사항이 적용되도록 postgresql.conf 파일을 다시 로드합니다. 예를 들어 Docker를 사용하여 AlloyDB Omni를 설치한 경우 다음을 실행하여 Docker 인스턴스를 다시 시작하고 postgresql.conf를 다시 로드합니다.
일부 매개변수는 변경사항을 적용하려면 클러스터를 다시 시작해야 합니다. 다시 시작이 필요한 매개변수의 목록은 pg_catalog.pg_settings에서 가져올 수 있습니다. pg_catalog.pg_settings.context = 'postmaster'가 있는 매개변수는 다시 시작해야 합니다.
AlloyDB Omni가 데이터베이스 클러스터 매니페스트에서 요청한 매개변수를 적용할 수 없는 경우 currentParameters 필드의 값이 매니페스트의 parameters 필드 값과 다를 수 있습니다. 예를 들어 존재하지 않는 매개변수를 적용하거나 정수 매개변수에 문자열 값을 설정하는 경우입니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eDatabase parameters for AlloyDB Omni can be configured by modifying Grand Unified Configuration (GUC) parameters in either the \u003ccode\u003epostgresql.conf\u003c/code\u003e file or the database cluster manifest.\u003c/p\u003e\n"],["\u003cp\u003eIn VM environments, edit the \u003ccode\u003epostgresql.conf\u003c/code\u003e file to update parameters, and then reload the file for the changes to take effect, such as by restarting the Docker instance.\u003c/p\u003e\n"],["\u003cp\u003eOn Kubernetes clusters, database parameters are managed in the \u003ccode\u003eparameters\u003c/code\u003e field of the \u003ccode\u003eprimarySpec\u003c/code\u003e within the database cluster manifest, using key-value pairs for each parameter.\u003c/p\u003e\n"],["\u003cp\u003eParameters that require a restart, indicated by \u003ccode\u003epg_catalog.pg_settings.context = 'postmaster'\u003c/code\u003e, will automatically trigger a database restart when updated on Kubernetes clusters.\u003c/p\u003e\n"],["\u003cp\u003eYou can view the currently applied parameters using the \u003ccode\u003ekubectl get dbclusters.alloydbomni.dbadmin.goog dbcluster-sample -o jsonpath={.status.primary.currentParameters}\u003c/code\u003e command, noting that discrepancies can occur if invalid parameter settings are applied.\u003c/p\u003e\n"]]],[],null,["# Configure AlloyDB Omni database parameters\n\nSelect a documentation version: 15.7.0keyboard_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 parameter for AlloyDB Omni, you can update [Grand Unified Configuration (GUC) parameters](https://www.postgresql.org/docs/current/config-setting.html) in either of the following:\n\n\u003cbr /\u003e\n\n- The `postgresql.conf` file for environments running AlloyDB Omni on a VM.\n\n- The database cluster manifest for environments running AlloyDB Omni on [a Kubernetes cluster](/alloydb/omni/15.7.0/docs/deploy-kubernetes).\n\nUpdate a parameter in containerized AlloyDB Omni\n------------------------------------------------\n\nIn an AlloyDB Omni running on a VM, you can update a parameter by editing the `postgresql.conf` file as follows:\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.7.0/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.7.0/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\n\nFor more\ninformation, see\n[Setting parameters](https://www.postgresql.org/docs/current/config-setting.html)\nin PostgreSQL documentation.\n\nUpdate a parameter in AlloyDB Omni on a Kubernetes cluster\n----------------------------------------------------------\n\nYou can configure database parameters using the `parameters` field in the `primarySpec` section of your database cluster manifest: \n\n spec:\n primarySpec:\n parameters:\n \"\u003cvar translate=\"no\"\u003ePARAMETER_NAME\u003c/var\u003e\": \"\u003cvar translate=\"no\"\u003ePARAMETER_VALUE\u003c/var\u003e\"\n ...\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePARAMETER_NAME\u003c/var\u003e: the name of the parameter---for example, `autovacuum`.\n- \u003cvar translate=\"no\"\u003ePARAMETER_VALUE\u003c/var\u003e: the value of the parameter---for example, `off`.\n\n| **Note:** Repeat the \u003cvar translate=\"no\"\u003ePARAMETER_NAME\u003c/var\u003e`\": \"`\u003cvar translate=\"no\"\u003ePARAMETER_VALUE\u003c/var\u003e line of code for each name-value pair that you have.\n\nSome 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.\n\nTo update database parameters, run the following command: \n\n kubectl patch dbclusters.alloydbomni.dbadmin.goog dbcluster-sample -p '{\"spec\":{\"primarySpec\":{\"parameters\": {\"\u003cvar translate=\"no\"\u003ePARAMETER_NAME\u003c/var\u003e\": \"\u003cvar translate=\"no\"\u003ePARAMETER_VALUE\u003c/var\u003e\"}}}}' --type=merge\n\n| **Note:** For parameters that require a restart, updating parameters restarts the database automatically.\n\nParameter settings are located in the `status` part of the `currentParameters` field.\n\nTo view database parameters, run the following: \n\n kubectl get dbclusters.alloydbomni.dbadmin.goog dbcluster-sample -o jsonpath={.status.primary.currentParameters}\n\nThe output looks similar to the following: \n\n {\"autovacuum\":\"off\",\"max_connections\":\"3000\"}\n\nIf AlloyDB Omni cannot apply the parameters that you request in the database cluster manifest, then the values for the `currentParameters` field can differ from the values in the `parameters` field of your manifest. For example, you apply a non-existent parameter or you set a string value to an integer parameter."]]