1.找到postgres配置文件,在数据库连接中执行下列代码,查询postgres.conf配置文件位置
SHOW config_file;
2.找到配置文件,修改logging_collector为on
3.通过以下指令能查询参数生效等级,可以查询到logging_collector为postmaster,必须重启才生效
select name, context from pg_settings;
4.重启服务器,到postgres下的bin目录下执行pg_ctl指令,下面是重启命令
pg_ctl restart [-w] [-s] [-D datadir] [-m s[mart] | f[ast] | i[mmediate] ] [-o options]