# event_triggers

> event_triggers is the PostgreSQL setting that controls whether PostgreSQL enables event triggers.
---

> [!NOTE]
> **Fact — official short description:** “Enables event triggers.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `bool` | Upstream pg_settings type |
| Context | `superuser` | Settable at runtime by a superuser |
| Unit | — | Raw unit |
| Range | — | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Client Connection Defaults / Statement Behavior | Upstream classification |
| Latest boot value | `on` | on |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG17 |
| Present in | PG17–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`7750fefdb2b8`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=7750fefdb2b81e0ee09c523d0a21cbd37edaf4b2) — Add GUC for temporarily disabling event triggers |
| Commit date | 2023-09-25 |
| Discussion | [thread 1](https://postgr.es/m/9140106E-F9BF-4D85-8FC8-F2D3C094A6D9@yesql.se) · [thread 2](https://postgr.es/m/0d46d29f-4558-3af9-9c85-7774e14a7709@postgrespro.ru) |

## Default history {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG17–19 Beta 3 | `on` | — | on |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#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.

## Tuning advice {#tuning-advice}

> [!TIP]
> **Advice.** These are workload-specific starting points and must be validated with measurements.

| Workload | Guidance |
| --- | --- |
| 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. |
| OLAP | Keep event triggers enabled unless a documented bulk-load procedure has reviewed every lost audit or DDL side effect. |
| Small nodes | Leave the default on; disabling event triggers saves no meaningful resources and can silently bypass controls. |
{.full-width}

## Pigsty {#pigsty}

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.

| Template | Effective value | Versus upstream boot | Source expression |
| --- | --- | --- | --- |
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG17–19 Beta 3 unmodified; OLAP: PG17–19 Beta 3 unmodified; CRIT: PG17–19 Beta 3 unmodified; TINY: PG17–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-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.

## Related parameters {#related-parameters}

[`search_path`](/parameters/search-path/) · [`row_security`](/parameters/row-security/) · [`session_replication_role`](/parameters/session-replication-role/) · [`restrict_nonsystem_relation_kind`](/parameters/restrict-nonsystem-relation-kind/) · [`createrole_self_grant`](/parameters/createrole-self-grant/)

## References {#references}

- [PostgreSQL 19 Beta 3 — event_triggers](https://www.postgresql.org/docs/19/runtime-config-client.html#GUC-EVENT-TRIGGERS)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
