Flag yang ditandai dengan Instance restarts berarti AlloyDB
memulai ulang instance setiap kali Anda menyetel, menghapus, atau mengubah flag ini di instance tersebut. Nilai flag tetap ada untuk instance hingga Anda mengubahnya lagi.
alloydb.enable_pgaudit
Jenis
boolean
Default
off
Instance dimulai ulang
Ya
Mengontrol ketersediaan ekstensi pgaudit di instance AlloyDB. Tetapkan parameter ke on dan mulai ulang instance. Kemudian, tambahkan ekstensi
pgaudit ke setiap database dalam instance menggunakan perintah CREATE
EXTENSION.
Ekstensi pgaudit menyediakan log audit sesi
dan objek yang mendetail menggunakan fasilitas logging standar yang disediakan oleh
PostgreSQL.
alloydb.log_throttling_window
Jenis
integer
Default
0
Instance dimulai ulang
Tidak
Mengontrol apakah AlloyDB mencatat pesan log duplikat yang diterima selama jangka waktu tertentu.
Jika disetel ke nilai yang lebih besar dari 0, AlloyDB akan memulai timer selama beberapa detik setiap kali mencatat pesan log. Jika
AlloyDB menerima pesan log yang identik sebelum timer
berakhir, AlloyDB tidak akan mencatat pesan tersebut. Setelah timer berakhir,
AlloyDB menambahkan jumlah pesan yang dilewati ke
kemunculan berikutnya dari pesan log yang sama yang direkamnya.
Jika ditetapkan ke 0, AlloyDB akan mencatat semua pesan log duplikat.
alloydb.promote_cancel_to_terminate
Jenis
boolean
Default
off
Instance dimulai ulang
Tidak
Jika disetel ke true, semua permintaan pembatalan kueri karena masalah seperti waktu tunggu penguncian, waktu tunggu pernyataan, dan konflik pemulihan (pemutaran ulang) yang dialami AlloyDB, akan dipromosikan menjadi permintaan penghentian backend paksa.
Dengan mempromosikan permintaan pembatalan, AlloyDB membantu mencegah backend yang macet memblokir pemutaran ulang log dan backend lainnya.
alloydb.pg_shadow_select_role
Jenis
string
Default
String kosong
Instance dimulai ulang
Tidak
Nama peran PostgreSQL yang akan digunakan untuk memberikan izin guna membuat kueri tampilan pg_shadow.
[[["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\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."]]