On 12/28/2014 06:37 PM, Ravi Kiran wrote: > > "Could not attach to process. If your uid matches the uid of the target > process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try > again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf" > > how do we rectify this error?
At a guess, the PostgreSQL you are trying to attach to is not running under the same user account as Eclipse. The Linux kernel only permits you to attach to a process with the same user account as you by default, unless you are the root user. That's what "if your uid matches the uid of the target process" refers to. You'll have the same issue when attaching using gdb directly, this isn't an Eclipse issue. If you were debugging manually with gdb you'd often do something like sudo -u postgres gdb -p thepid to run gdb as the same user id as the target process. (Avoid running gdb as root whenever possible). Perhaps Eclipse lets you configure a prefix command for gdb so you can do that with Eclipse and passwordless sudo? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers