Chinaunix首页 | 论坛 | 博客
  • 博客访问: 37421
  • 博文数量: 14
  • 博客积分: 452
  • 博客等级: 下士
  • 技术积分: 115
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-09 17:40
文章分类
文章存档

2011年(14)

我的朋友

分类: C/C++

2011-03-22 14:49:58

本文系转载他人文章
You should be able to attach gdb to a running postgresql backend- although you'll probably want to ensure your postgresql build has debugging symbols left in it to make that comprehensible. If you do select pg_backend_pid() you'll get the backend's process ID that you're dealing with, and can then attach gdb to it (using the --pid switch or attach command). This approach is only useful if you can reproduce the problem using psql, for example, though: having new backend processes automatically attached to be a gdb is... harder. For example, you can set options such as post_auth_delay to make postgresql wait after authentication has finished, giving you a chance to attach the debugger before it continues processing.
阅读(1847) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~