event_source is a Windows parameter, which means that for most of the people reading this it does exactly nothing. If you run PostgreSQL on Linux, or on a managed service, there is no Windows Event Log for it to talk to, and this string sits at its default forever. What follows is for the Windows minority, and it comes down to one fact worth knowing.

Default PostgreSQL, context postmaster, so changing it takes a restart. Its job is to name PostgreSQL’s messages in the Windows Event Log, and it only comes into play when log_destination includes eventlog. With that set, every server message is written to the Windows Application log tagged with the event_source name, which is how you tell one instance’s messages from another’s when several PostgreSQL servers share a host. That is the reason to change it: give each instance a distinct name, postgres-main, postgres-analytics, whatever, instead of leaving them all logging as PostgreSQL.

The one fact is that this name is half of a handshake, and Windows owns the other half. Setting event_source in postgresql.conf tells PostgreSQL what to log under; it does not tell Windows what that name means. The message text itself lives in a resource library, pgevent.dll, and Windows locates it through a registry entry keyed by the event source name. You create that entry with regsvr32: the plain form registers the default PostgreSQL source, and regsvr32 /n /i:your_name pgevent.dll registers a custom one. The standard installer runs the plain form for you, which is why PostgreSQL works out of the box and a name you invented does not.

Skip that step and the symptom is unmistakable. You change event_source to something like postgres-main, restart, and the Application log fills with entries reading that the description for the event ID cannot be found. The messages are arriving intact; Windows simply has no registered source under that name and cannot locate the text to render them. The fix is not in PostgreSQL. It is the regsvr32 /n /i: registration you owed the operating system when you picked the name.

So on Windows, treat event_source and its regsvr32 registration as a matched pair: set both before you rely on the log, and remember the name change needs a restart to take effect. Everywhere else, it is a string with nothing on the other end of it, and the correct amount of attention to give it is none.