- PostgreSQL 11 Administration Cookbook
- Simon Riggs Gianni Ciolli Sudheer Kumar Meesala
- 110字
- 2021-06-24 14:35:00
There's more...
The log_destination parameter controls where the log messages are stored. The valid values are stderr, csvlog, syslog, and eventlog (the latter is only on Windows).
The logging collector is a background process that writes to a log file everything that the PostgreSQL server outputs to stderr. This is probably the most reliable way to log messages in case of problems, since it depends on fewer services.
Log rotation can be controlled with settings such as log_rotation_age and log_rotation_size if you are using the logging collector. Alternatively, it is possible to configure the logrotate utility to perform log rotation, which is the default on Debian and Ubuntu systems.