February 26, 2026: PostgreSQL 18.3, 17.9, 16.13, 15.17, and 14.22 Released!
Supported Versions: Current (18) / 17 / 16 / 15 / 14
Development Versions: devel
Unsupported versions: 13 / 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2
18.12. Registering Event Log on Windows #
To register a Windows event log library with the operating system, issue this command:
regsvr32 _`pgsql_library_directory`_/pgevent.dll
This creates registry entries used by the event viewer, under the default event source named PostgreSQL.
To specify a different event source name (see event_source), use the /n and /i options:
regsvr32 /n /i:_`event_source_name`_ _`pgsql_library_directory`_/pgevent.dll
To unregister the event log library from the operating system, issue this command:
regsvr32 /u [/i:_`event_source_name`_] _`pgsql_library_directory`_/pgevent.dll
Note
To enable event logging in the database server, modify log_destination to include eventlog in postgresql.conf.
Submit correction
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.