Where to Find PostgreSQL Logs
About PostsgreSQL Logs
PostgreSQL logs are primarily controlled by the logging_collector, log_directory, and log_destination parameters in the postgresql.conf file.
The postgresql.conf file is generally stored in the PostgreSQL data directory on Microsoft Windows. The specific location can vary based on the version and installation choices, but the common paths are:
- C:\Program Files\PostgreSQL\<version>\data\
- For example: C:\Program Files\PostgreSQL\16\data\
archTIS Spirion installs the postgresql.conf file as a .sample file to the following directory:
- C:\Program Files (x86)\Spirion\Postgres\pgsql\share\postgresql.conf.sample
Key Information about the PostgreSQL data directory:
- The data directory might require administrator privileges to access or modify the files within it.
- Restart Required: After editing the
postgresql.conffile, you must reload the configuration (usingpg_ctl reloador thepg_reload_conf()SQL function) or restart the PostgreSQL service for the changes to take effect.
Default Location of Spirion PostgreSQL Logs in Windows
On Microsoft Windows, archTIS Spirion installs PostgreSQL to the following directory:
- C:\ProgramData\Identity Finder\Postgres\
Logs are stored in the pg_log directory within the main PostgreSQL data directory:
- C:\ProgramData\Identity Finder\Postgres\Data\pg_log
- This is not the default logs directory used by a stand-alone PostgreSQL installation.
- This location is specific to the PostgreSQL instance installed and used by Spirion Sensitive Data Platform v13.6+
Alternative Log Destination: Windows Event Viewer
PostgreSQL on Windows can also be configured to send logs to the Windows Event Viewer instead of, or in addition to, files. This enables you to view all system and application logs in one centralized location using the built-in Windows Event Viewer application.
If configured to use the Event Viewer, you can access the logs via the standard Windows eventvwr.msc tool, typically in the Windows Logs > Application section.
For more details about logging, refer to the official PostgreSQL documentation.