event_source
Fact — official short description: “Sets the application name used to identify PostgreSQL messages in the event log.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.2 |
| Present in | PG9.2–19 Beta 3 |
| Removed in | No |
| Introduction commit | d8ea33f2c027 — Support configurable eventlog application names on Windows |
| Commit date | 2011-10-25 |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.2–19 Beta 3 | PostgreSQL |
— | PostgreSQL |
How it works
event_source sets the application name used to identify PostgreSQL messages in the event log. This is a Windows event-log identifier and has no effect unless eventlog is an active log destination.
event_source is a POSTMASTER-context setting: PostgreSQL reads it during server startup, and a configuration reload or session SET cannot activate a new value.
event_source is consulted only on Windows when eventlog is selected in log_destination; Windows Event Log registration, permissions, routing, and retention supply the rest of the pipeline.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Set event_source only for a Windows eventlog deployment, using a stable non-secret identity registered and routed by the host logging policy. |
| OLAP | Keep the same event source across workload classes so Windows collection rules and dashboards do not fragment by profile. |
| Small nodes | Leave event_source at its default unless eventlog is selected; changing a dormant label provides no capacity or observability benefit. |
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 | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.2–19 Beta 3 unmodified; OLAP: PG9.2–19 Beta 3 unmodified; CRIT: PG9.2–19 Beta 3 unmodified; TINY: PG9.2–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Expecting a reload or SET to activate event_source, although it requires a controlled server restart.
- Changing the source name without registering or updating Windows Event Log routing and access policy.
- Expecting event_source to have any effect when eventlog is not an active log destination or the platform is not Windows.
- Changing event_source globally without a rollback plan and a client or operational compatibility test.
Related parameters
logging_collector · log_destination · log_directory · log_filename · log_rotation_age · log_rotation_size