PG安装完成后默认不会记录日志,必须修改对应的(${PGDATA}/postgresql.conf)配置才可以,这里只介绍常用的日志配置。
1.logging_collector = on/off ---- 是否将日志重定向至文件中,默认是off(该配置修改后,需要重启DB服务)
DB安装完成,启动的服务进程如下
`[root@localhost ~]# ps -elf | grep postgres`
0 S postgres 2385 1 0 80 0 - 66829 poll_s 12:41 ? 00:00:00 /opt/pg9.6/bin/postgres -D /mnt/pgdata
1 S postgres 2387 2385 0 80 0 - 66829 ep_pol 12:41 ? 00:00:00 postgres: checkpointer process
1 S postgres 2388 2385 0 80 0 - 66829 ep_pol 12:41 ? 00:00:00 postgres: writer process
1 S postgres 2389 2385 0 80 0 - 66870 ep_pol 12:41 ? 00:00:00 postgres: wal writer process
1 S postgres 2390 2385 0 80 0 - 66952 ep_pol 12:41 ? 00:00:00 postgres: autovacuum l