{"Entry":{"collection":"guc","key":"event_triggers","name":"event_triggers","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Client Connection Defaults / Statement Behavior","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"16","status":"added","to":"17"}],"content_hash":"274d0e409b26f64f51f6694015c56683c81942051d5e6e95afd5ffcf99df9bdd","context":"","default_changed_in":[],"default_history":[{"from":"17","to":"19","value":"on"}],"editorial":{"advice":{"olap":"Keep event triggers enabled unless a documented bulk-load procedure has reviewed every lost audit or DDL side effect.","oltp":"Do not tune event_triggers or leave it off as normal operation. Disable it only in a controlled repair session, identify the faulty trigger, and restore it immediately.","small":"Leave the default on; disabling event triggers saves no meaningful resources and can silently bypass controls."},"mechanism":["event_triggers enables event triggers. When enabled, event triggers will fire for all applicable statements. The switch disables all event triggers as an emergency repair aid; it is not a selective trigger policy and requires elevated SET privilege.","event_triggers is a SUPERUSER-context setting. Superuser or a role granted the appropriate SET privilege can change it for a session, while ALTER ROLE or ALTER DATABASE can establish a default for future sessions.","Because session state can survive in pooled connections, role defaults, SET privilege, RESET behavior, and application checkout hooks are part of the control's effective boundary."],"pitfalls":["Changing event_triggers in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.","Granting broad SET rights to a control that can change correctness, policy enforcement, or name resolution.","Failing to reset a security-sensitive session value before a pooled connection is reused by another request.","Changing event_triggers globally without a rollback plan and a client or operational compatibility test."],"references":[{"title":"PostgreSQL 19 Beta 4: event_triggers","url":"https://www.postgresql.org/docs/19/runtime-config-client.html#GUC-EVENT-TRIGGERS"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["search_path","row_security","session_replication_role","restrict_nonsystem_relation_kind","createrole_self_grant"],"summary":"event_triggers is the PostgreSQL setting that controls whether PostgreSQL enables event triggers."},"enumvals":[],"first_version":"17","group":"Client Connection Defaults","group_slug":"client","imported_at":"2026-09-27T17:57:31.256865+08:00","intro_commit":{"authored_at":"2023-09-25T12:41:49+02:00","discussion":["https://postgr.es/m/9140106E-F9BF-4D85-8FC8-F2D3C094A6D9@yesql.se","https://postgr.es/m/0d46d29f-4558-3af9-9c85-7774e14a7709@postgrespro.ru"],"hash":"7750fefdb2b81e0ee09c523d0a21cbd37edaf4b2","subject":"Add GUC for temporarily disabling event triggers","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=7750fefdb2b81e0ee09c523d0a21cbd37edaf4b2"},"key":"event_triggers","last_version":"20","max_val":"","min_val":"","name":"event_triggers","position":140,"present_in":["17","18","19","20"],"short_desc":"Allow temporarily disabling execution of event triggers in order to troubleshoot and repair faulty event triggers.","short_desc_zh":"","source_rev":"english-manuals:2268c178286e68ab8f0540613b6cfbdcb75a9b4504bd5ee71dcb1d81a145e00f","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"event_triggers","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"event_triggers","SourceRevision":"english-manuals:2268c178286e68ab8f0540613b6cfbdcb75a9b4504bd5ee71dcb1d81a145e00f","Facts":{"boot_val":"on","category":"Client Connection Defaults / Statement Behavior","context":"superuser","description":"Allow temporarily disabling execution of event triggers in order to troubleshoot and repair faulty event triggers. All event triggers will be disabled by setting it to false. Setting the value to true allows all event triggers to fire, this is the default value. Only superusers and users with the appropriate SET privilege can change this setting.","doc":{"anchor":"GUC-EVENT-TRIGGERS","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"},"documented":true,"enumvals":null,"extra_desc":"When enabled, event triggers will fire for all applicable statements.","lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"event_triggers","short_desc":"Enables event triggers.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-EVENT-TRIGGERS","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"event_triggers","SourceDatabase":"center","Version":"18","Locale":"en","Title":"event_triggers","Summary":"Allow temporarily disabling execution of event triggers in order to troubleshoot and repair faulty event triggers. All event triggers will be disabled by setting it to false. Setting the value to true allows all event triggers to fire, this is the default value. Only superusers and users with the appropriate SET privilege can change this setting.","BodyHTML":"\u003cp\u003eAllow temporarily disabling execution of event triggers in order to troubleshoot and repair faulty event triggers. All event triggers will be disabled by setting it to false. Setting the value to true allows all event triggers to fire, this is the default value. Only superusers and users with the appropriate SET privilege can change this setting.\u003c/p\u003e","SourceRevision":"english-manuals:2268c178286e68ab8f0540613b6cfbdcb75a9b4504bd5ee71dcb1d81a145e00f","ContentHash":"b99ff2438dc0245b773046480592d50653a2f46a8ce42969ec8c323b38b48886","Payload":{"description":"Allow temporarily disabling execution of event triggers in order to troubleshoot and repair faulty event triggers. All event triggers will be disabled by setting it to false. Setting the value to true allows all event triggers to fire, this is the default value. Only superusers and users with the appropriate SET privilege can change this setting."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
