{"Entry":{"collection":"guc","key":"event_source","name":"event_source","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Reporting and Logging / Where to Log","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"9.1","status":"added","to":"9.2"},{"documentation_changed":true,"fields":{},"from":"12","status":"changed","to":"13"}],"content_hash":"f3478e23f81301892f2c5c54a1822bcb02e0075f3a6cd03e7063c40aaf1d5c94","context":"","default_changed_in":[],"default_history":[{"from":"9.2","to":"19","value":"PostgreSQL"}],"editorial":{"advice":{"olap":"Keep the same event source across workload classes so Windows collection rules and dashboards do not fragment by profile.","oltp":"Set event_source only for a Windows eventlog deployment, using a stable non-secret identity registered and routed by the host logging policy.","small":"Leave event_source at its default unless eventlog is selected; changing a dormant label provides no capacity or observability benefit."},"mechanism":["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."],"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."],"references":[{"title":"PostgreSQL 19 Beta 4: event_source","url":"https://www.postgresql.org/docs/19/runtime-config-logging.html#GUC-EVENT-SOURCE"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["logging_collector","log_destination","log_directory","log_filename","log_rotation_age","log_rotation_size"],"summary":"event_source is the PostgreSQL setting that defines the application name used to identify PostgreSQL messages in the event log."},"enumvals":[],"first_version":"9.2","group":"Reporting and Logging","group_slug":"logging","imported_at":"2026-09-30T00:40:57.090909+08:00","intro_commit":{"authored_at":"2011-10-25T20:02:55+02:00","discussion":[],"hash":"d8ea33f2c02721c89c2434b9fda170afb7fe4999","subject":"Support configurable eventlog application names on Windows","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=d8ea33f2c02721c89c2434b9fda170afb7fe4999"},"key":"event_source","last_version":"20","max_val":"","min_val":"","name":"event_source","position":139,"present_in":["9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"When logging to event log is enabled, this parameter determines the program name used to identify PostgreSQL messages in the log.","short_desc_zh":"","source_rev":"english-manuals:9d38ce4506557603a0d78ecc57fb5830e2b19d158c8d854737791ee8f07e3b40","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"event_source","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"event_source","SourceRevision":"english-manuals:9d38ce4506557603a0d78ecc57fb5830e2b19d158c8d854737791ee8f07e3b40","Facts":{"boot_val":"PostgreSQL","category":"Reporting and Logging / Where to Log","context":"postmaster","description":"When logging to event log is enabled, this parameter determines the program name used to identify PostgreSQL messages in the log. The default is PostgreSQL. This parameter can only be set at server start.","doc":{"anchor":"GUC-EVENT-SOURCE","file":"runtime-config-logging.html","lang":"en","sha256":"93c48c522a72fca19705c4c91a71e951eae653662008eee2e4a9a74a11127fde","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"event_source","short_desc":"Sets the application name used to identify PostgreSQL messages in the event log.","source":"pg-settings-source-snapshot","unit":null,"vartype":"string"},"ManualEvidence":{"doc":{"anchor":"GUC-EVENT-SOURCE","file":"runtime-config-logging.html","lang":"en","sha256":"93c48c522a72fca19705c4c91a71e951eae653662008eee2e4a9a74a11127fde","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"event_source","SourceDatabase":"center","Version":"18","Locale":"en","Title":"event_source","Summary":"When logging to event log is enabled, this parameter determines the program name used to identify PostgreSQL messages in the log. The default is PostgreSQL. This parameter can only be set at server start.","BodyHTML":"\u003cp\u003eWhen logging to event log is enabled, this parameter determines the program name used to identify PostgreSQL messages in the log. The default is PostgreSQL. This parameter can only be set at server start.\u003c/p\u003e","SourceRevision":"english-manuals:9d38ce4506557603a0d78ecc57fb5830e2b19d158c8d854737791ee8f07e3b40","ContentHash":"5f5814be520b2569fffd3d23c593985828cd3542bec4c7b1dc8671cd14a94bd1","Payload":{"description":"When logging to event log is enabled, this parameter determines the program name used to identify PostgreSQL messages in the log. The default is PostgreSQL. This parameter can only be set at server start."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.2","9.3","9.4","9.5","9.6"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
