我按照如何记录PostgreSQL查询?所述的方法进行操作,但日志收集器仍然未开启。
postgres=# show logging_collector;
logging_collector
-------------------
off
(1 row)
我的postgresql.conf文件看起来像这样:
listen_addresses = '*'
tcpip_socket = true
log_statement = 'all'
log_connections = yes
log_destination = 'syslog'
logging_collector = on
log_directory = '/var/log/pg_log'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
log_truncate_on_rotation = true
log_rotation_age = 1440
client_min_messages = LOG
log_min_messages = INFO
log_min_error_statement = DEBUG5
log_min_duration_statement = 0
pg_reload_config()
应该根据第二个高亮显示更改为pg_reload_conf()
。 - rjpSELECT pg_reload_conf();
。 - Kevin G