Answers
下面给一个参考:
# 哪里写入日志
#log_destination = 'stderr'
logging_collector = on
log_directory = 'log'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
# 何时记录日志
#client_min_messages = notice
log_min_messages = debug5
# 记录什么?
debug_print_parse = on
debug_print_rewritten = on
debug_print_plan = on
debug_pretty_print = on
#log_checkpoints = off
log_connections = on
log_disconnection = on
重启服务器后,就可以在/usr/local/pgsql/data/log 目录下,看到生成的日志。
风鸟院花月
answered 11 years, 4 months ago