hillpig的个人博客分享 http://blog.sciencenet.cn/u/hillpig 畅想ing,思考ing,前行ing Email:bluevaley@gmail.com

博文

配置postgresql服务器以查看日志

已有 12049 次阅读 2010-5-5 01:50 |个人分类:postgresql|系统分类:科研笔记| 日志, postgresql, log

参考PostgreSQL 8.4.3 Documentation :
18.7. Error Reporting and Logging(http://www.postgresql.org/docs/8.4/interactive/runtime-config-logging.html)来进行设置,我的设置如下,大家可以做一个参考:

# - Where to Log -
#log_destination = 'stderr'
logging_collector = on  
log_directory = 'pg_log'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'  

# - When to Log -

#client_min_messages = notice
log_min_messages = debug5
         
# - What to Log -
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/pg_log 目录下,就可以看到生成的日志了。


加我私人微信,交流技术。




https://blog.sciencenet.cn/blog-419883-319887.html

上一篇:group by 语句从parsetree到portal全过程内存结构
下一篇:how to display local variables when debugging postgresql in
收藏 IP: 223.72.72.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (1 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-25 14:21

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部