[英]Change PostgreSQL log directory
How can I change the log directory from PostgreSQL 12?如何从 PostgreSQL 12 更改日志目录? I need to change the default /var/log/ location to point to another disk location.我需要更改默认的 /var/log/ 位置以指向另一个磁盘位置。
Edit postgresql.conf
, set logging_collector = on
(if it isn't already set that way) and change log_directory
appropriately.编辑postgresql.conf
,设置logging_collector = on
(如果尚未设置)并适当更改log_directory
。
Then restart PostgreSQL (if you didn't change logging_collector
, then a reload is enough).然后重新启动 PostgreSQL (如果您没有更改logging_collector
,那么重新加载就足够了)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.