Re: [HACKERS] gdb with postgres

2011-06-06 Thread HuangQi
On 6 June 2011 21:57, Kevin Grittner wrote: > HuangQi wrote: > > >>> (gdb) b qp_add_paths_to_joinrel > >>> Breakpoint 1 at 0x1a6744: file joinpath.c, line 67. > >>> (gdb) attach 23903 > > > If I enter c, gdb will directly finish executing this process and > > current query will finish. > > Are y

Re: [HACKERS] gdb with postgres

2011-06-06 Thread Kevin Grittner
HuangQi wrote: >>> (gdb) b qp_add_paths_to_joinrel >>> Breakpoint 1 at 0x1a6744: file joinpath.c, line 67. >>> (gdb) attach 23903 > If I enter c, gdb will directly finish executing this process and > current query will finish. Are you absolutely sure that running your query will result in a

Re: [HACKERS] gdb with postgres

2011-06-06 Thread Robert Haas
On Mon, Jun 6, 2011 at 9:47 AM, HuangQi wrote: > If I enter c, gdb will directly finish executing this process and current > query will finish. Furthermore, if I enter next query, gdb will not debug it > and stay in continue status. Hmm, that must mean your breakpoint isn't properly set. Instead

Re: [HACKERS] gdb with postgres

2011-06-06 Thread HuangQi
If I enter c, gdb will directly finish executing this process and current query will finish. Furthermore, if I enter next query, gdb will not debug it and stay in continue status. On 6 June 2011 21:44, Robert Haas wrote: > On Mon, Jun 6, 2011 at 3:43 AM, HuangQi wrote: > > Hi, > >I was usin

Re: [HACKERS] gdb with postgres

2011-06-06 Thread Robert Haas
On Mon, Jun 6, 2011 at 3:43 AM, HuangQi wrote: > Hi, >    I was using gdb to debug postgres. In order to debug the backend of > running query, I start postgres first and use "select * from > pg_backend_pid()" to ask for backend pid. Then I start gdb in another bash > window with "gdb postgres" and

Re: [HACKERS] gdb with postgres

2011-06-06 Thread HuangQi
Sorry, but recompile with this flag still doesn't work. On 6 June 2011 15:46, Pavan Deolasee wrote: > On Mon, Jun 6, 2011 at 1:13 PM, HuangQi wrote: > > Hi, > >I was using gdb to debug postgres. In order to debug the backend of > > running query, I start postgres first and use "select * fro

Re: [HACKERS] gdb with postgres

2011-06-06 Thread Pavan Deolasee
On Mon, Jun 6, 2011 at 1:13 PM, HuangQi wrote: > Hi, >    I was using gdb to debug postgres. In order to debug the backend of > running query, I start postgres first and use "select * from > pg_backend_pid()" to ask for backend pid. Then I start gdb in another bash > window with "gdb postgres" and

[HACKERS] gdb with postgres

2011-06-06 Thread HuangQi
Hi, I was using gdb to debug postgres. In order to debug the backend of running query, I start postgres first and use "select * from pg_backend_pid()" to ask for backend pid. Then I start gdb in another bash window with "gdb postgres" and attach the pid obtained above and set the breakpoint. The