select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

CONFIGURATION / CLIENT CONNECTION DEFAULTS

event_triggers

Read PG 18 manual ↗

Allow temporarily disabling execution of event triggers in order to troubleshoot and repair faulty event triggers.

Type
bool
Context
superuser
Measured default
on
Unit
Metadata snapshot
18

Definition PG 18 manual

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.

Measured default history
Version intervalDefault
17 – 19on
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

How it works

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.

Operational considerations

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.

Workload guidance

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.

Version history 1
  1. PG 16 → 17added

Related entries

Further reading

Definition snapshot: english-manuals:393818a403882ea7328868cb5a9… · English manual source