DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Reporting and Logging / Where to Log

event_source

Sets the application name used to identify PostgreSQL messages in the event log.

  • Default: PostgreSQL
  • Type: string
  • Applies: Restart required

In plain words

On Windows, PostgreSQL can write to the Event Log you see in Event Viewer. This is the "Source" name shown next to each event, so you can tell PostgreSQL apart from other programs, or one PostgreSQL service from another.

For DBAs and operators

Used only with eventlog in log_destination, on Windows. The name must be registered so that Event Viewer can format the messages; otherwise entries show "The description for Event ID 0 from source … cannot be found". Register it with the bundled DLL (as Administrator):

regsvr32 /n /i:PostgreSQL_18 "C:\Program Files\PostgreSQL\18\lib\pgevent.dll"
# then in postgresql.conf
event_source = 'PostgreSQL_18'

Messages before the configuration file is read (very early startup errors) always use the source name PostgreSQL. pg_ctl register also takes -e source for the service's own messages. Severity mapping: ERROR and above become Error events, WARNING becomes Warning, the rest Information.

Requires a restart. On Linux/Unix the parameter exists but does nothing.

How to change it

Change in postgresql.conf or ALTER SYSTEM, then restart the server.

See it in context

Logger (logging collector)

Related parameters

log_destination syslog_ident

All Reporting and Logging parameters