[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThis page details the database flags specific to AlloyDB for PostgreSQL, which are used to manage unique service features, and a list of all database flags can be found in the Supported database flags page.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ealloydb.enable_pgaudit\u003c/code\u003e flag controls the availability of the \u003ccode\u003epgaudit\u003c/code\u003e extension, requires instance restarts when modified, and should be set in coordination with the PostgreSQL \u003ccode\u003elogging_collector\u003c/code\u003e parameter to avoid audit log loss.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ealloydb.log_throttling_window\u003c/code\u003e flag, which does not require instance restarts, determines whether duplicate log messages are recorded within a specified time window.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ealloydb.promote_cancel_to_terminate\u003c/code\u003e flag, when set to \u003ccode\u003etrue\u003c/code\u003e, transforms query cancellation requests into forced backend termination requests to prevent issues like stuck backends, and does not require an instance restart.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ealloydb.pg_shadow_select_role\u003c/code\u003e flag, which does not require an instance restart, defines the name of the PostgreSQL role that is granted permission to query the \u003ccode\u003epg_shadow\u003c/code\u003e view.\u003c/p\u003e\n"]]],[],null,["# AlloyDB flags\n\nSelect a documentation version:\n\n\n15.7.0keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/reference/alloydb-flags)\n- [16.8.0](/alloydb/omni/16.8.0/docs/reference/alloydb-flags)\n- [16.3.0](/alloydb/omni/16.3.0/docs/reference/alloydb-flags)\n- [15.12.0](/alloydb/omni/15.12.0/docs/reference/alloydb-flags)\n- [15.7.1](/alloydb/omni/15.7.1/docs/reference/alloydb-flags)\n- [15.7.0](/alloydb/omni/15.7.0/docs/reference/alloydb-flags)\n\n\u003cbr /\u003e\n\nThis page describes the database flags that AlloyDB for PostgreSQL uses to enable and manage various service features unique to AlloyDB. For a list of all database flags that AlloyDB supports, see [Supported database\nflags](/alloydb/omni/15.7.0/docs/reference/database-flags).\n\n\u003cbr /\u003e\n\nFlags marked with **Instance restarts** mean that AlloyDB\nrestarts an instance whenever you set, remove, or modify this flag on that\ninstance. The flag's value persists for the instance until you modify it again.\n\n### alloydb.enable_pgaudit\n\nControls the availability of the `pgaudit` extension in an AlloyDB\ninstance. Set the parameter to `on` and restart the instance. Then add the\n`pgaudit` extension to individual databases in the instance by using the `CREATE\nEXTENSION` command.\n\nThe [`pgaudit`](https://www.pgaudit.org/) extension provides detailed session\nand object audit logging using the standard logging facility provided by\nPostgreSQL.\n| **Warning:** In AlloyDB Omni only, enabling this extension and the PostgreSQL `logging_collector` parameter might result in loss of audit logs. To enable the PostgreSQL and audit logs, set `logging_collector` to `off` and `alloydb.enable_pgaudit` to `true`. To enable the PostgreSQL log, set `logging_collector` to `on` and `allobydb.enable_pgaudit` to `false`.\n\n### alloydb.log_throttling_window\n\nControls whether AlloyDB records duplicate log messages\nreceived during a specified time window.\n\nIf set to a value greater than `0`, then AlloyDB starts a\ntimer that many seconds long whenever it records a log message. If\nAlloyDB receives the identical log message before the timer\nexpires, it does not record the message. After the timer expires,\nAlloyDB appends a count of any skipped messages to the\nnext occurrence of the same log message that it records.\n\nIf set to `0`, then AlloyDB records all duplicate log\nmessages.\n\n### alloydb.promote_cancel_to_terminate\n\nIf set to `true`, then any query cancellation requests due to issues such as lock timeouts, statement timeouts, and recovery (replay) conflicts that AlloyDB encounters, are promoted to forced backend termination requests.\n\nBy promoting the cancellation requests, AlloyDB helps prevent stuck backends from blocking log replay and other backends.\n\n### alloydb.pg_shadow_select_role\n\nName of the PostgreSQL role that is to be used to grant permission to query the\n`pg_shadow` view."]]