Flags marked withInstance restartsmean that AlloyDB
restarts an instance whenever you set, remove, or modify this flag on that
instance. The flag's value persists for the instance until you modify it again.
alloydb.enable_pgaudit
Type
boolean
Default
off
Instance restarts
Yes
Controls the availability of thepgauditextension in an AlloyDB
instance. Set the parameter toonand restart the instance. Then add thepgauditextension to individual databases in the instance by using theCREATE
EXTENSIONcommand.
Thepgauditextension provides detailed session
and object audit logging using the standard logging facility provided by
PostgreSQL.
alloydb.log_throttling_window
Type
integer
Default
0
Instance restarts
No
Controls whether AlloyDB records duplicate log messages
received during a specified time window.
If set to a value greater than0, then AlloyDB starts a
timer that many seconds long whenever it records a log message. If
AlloyDB receives the identical log message before the timer
expires, it does not record the message. After the timer expires,
AlloyDB appends a count of any skipped messages to the
next occurrence of the same log message that it records.
If set to0, then AlloyDB records all duplicate log
messages.
alloydb.promote_cancel_to_terminate
Type
boolean
Default
off
Instance restarts
No
If set totrue, 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.
By promoting the cancellation requests, AlloyDB helps prevent stuck backends from blocking log replay and other backends.
alloydb.pg_shadow_select_role
Type
string
Default
An empty string
Instance restarts
No
Name of the PostgreSQL role that is to be used to grant permission to query thepg_shadowview.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\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."]]