{"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"}],"derived_content_hash":"3f789348660782dbbf7c909e2474a2c2addb8311f94a8ecbbb86dcf3c1d67a14","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:c9346f5c98b6382ea1cf572dd47281e61a74f1c83c8de89d33ef5f83b1df54f8","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"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"],"repair_provenance":{"original_source_revision":"english-manuals:9d38ce4506557603a0d78ecc57fb5830e2b19d158c8d854737791ee8f07e3b40","receipt_sha256":"f73432549a3c58377b3d63232a6283b2273b1e5f5b8e3a454d949b8289264c78","repair":"wiki-repair-20261023"},"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":"wiki-repair-20261023:c9346f5c98b6382ea1cf572dd47281e61a74f1c83c8de89d33ef5f83b1df54f8","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"event_source","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"event_source","SourceRevision":"wiki-repair-20261023:c9346f5c98b6382ea1cf572dd47281e61a74f1c83c8de89d33ef5f83b1df54f8","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.","description_zh":"当启用了向事件日志记录时，这个参数决定用来标识日志中 PostgreSQL 消息的程序名。默认值是 PostgreSQL。这个参数只能在服务器启动时设置。","description_zh_html":"\u003cp\u003e\n        当启用了向\u003cspan class=\"application\"\u003e事件日志\u003c/span\u003e记录时，这个参数决定用来标识日志中 \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e 消息的程序名。默认值是 \u003ccode class=\"literal\"\u003ePostgreSQL\u003c/code\u003e。这个参数只能在服务器启动时设置。\n       \u003c/p\u003e","doc":{"anchor":"GUC-EVENT-SOURCE","file":"runtime-config-logging.html","lang":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","slug":"18"},"doc_html":"\u003cp\u003e\n        When logging to \u003cspan class=\"application\"\u003eevent log\u003c/span\u003e is enabled, this parameter\n        determines the program name used to identify\n        \u003cspan class=\"productname\"\u003ePostgreSQL\u003c/span\u003e messages in\n        the log. The default is \u003ccode class=\"literal\"\u003ePostgreSQL\u003c/code\u003e.\n        This parameter can only be set at server start.\n       \u003c/p\u003e","doc_same_as":"","documentation_revision":{"inputs":[{"file":"runtime-config-logging.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","version":"18.7"},{"file":"runtime-config-logging.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"68c010254e1859ec0b76f06a563babd51a6c38997f1242e35e4c6b649724b1cb","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"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","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-logging.html","sha256":"a322f5293f10e348b5fc5dca98fdb6af52462723a215b8701c3b9d933e2933b4"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"string","zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"GUC-EVENT-SOURCE","file":"runtime-config-logging.html","lang":"en","sha256":"278d913b9c0f735c5cd7b35fd7205826bbd9c449805370d2dbe54105c0ed1d88","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\u003e\n        When logging to \u003cspan\u003eevent log\u003c/span\u003e is enabled, this parameter\n        determines the program name used to identify\n        \u003cspan\u003ePostgreSQL\u003c/span\u003e messages in\n        the log. The default is \u003ccode\u003ePostgreSQL\u003c/code\u003e.\n        This parameter can only be set at server start.\n       \u003c/p\u003e","SourceRevision":"wiki-repair-20261023:c9346f5c98b6382ea1cf572dd47281e61a74f1c83c8de89d33ef5f83b1df54f8","ContentHash":"acfc73a619c0ae0c4aad3d6edcbe0a221b65d077954a8828cc2cffa98be4ae2c","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":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
