Thread: two postgres binaries

two postgres binaries

From
kenneth d'souza
Date:
Hi,
 
I am attaching a PID of the a psql to the gdb debugger. However, I am unable to see the code location by the "where" command in gdb. I am of the feeling that postgres that is running doesn't have the debugging symbols.
 
This postgres is getting started by /usr/local/pgsql/pg_ctl which calls /usr/local/pgsql/posmaster.
However, When I configure and compile with --enable-debug and -g respectively it generates a postgres binary in the location /usr/local/postgres8.1.5/src/backend/ .
 
 I can't use the /usr/local/postgres8.1.5/src/bin/pg_ctl/pg_ctl to start /usr/local/postgres8.1.5/src/backend/postgres as it states that postgres must exists in the same location as that of pg_ctl.
 
Now, If I use gdb to this /usr/local/postgres8.1.5/src/backend/postgres it runs in single user mode and hence I can't connect via a psql session. Moreover it as a prompt of backend> . I can't even attach a PID now.

Hence my question
1. Which is exact method in debugging the postgres which has the debugging symbols and can be connected via psql?
2. what is the difference in the binary at 2 different locations.
/usr/local/postgres8.1.5/src/backend/
/usr/local/pgsql/
 
Thanks,
Kenneth


It's about getting married. Click here! Try it!

Re: two postgres binaries

From
Tom Lane
Date:
"kenneth d'souza" <kd_souza@hotmail.com> writes:
> However, When I configure and compile with --enable-debug and -g respectively it generates a postgres binary in the
location/usr/local/postgres8.1.5/src/backend/ . 

I think you forgot the "make install" step to put the built executable
into the desired target location ... or you could just "cp" it there.

            regards, tom lane

Re: two postgres binaries

From
kenneth d'souza
Date:
Yes, I didn't execute the "gmake install" earlier. now upon execution the binary with the debugging symbols are correctly copied to /usr/local/pgsql/bin
 
Thank You Tom.
 
Thanks,
Kenneth
 
 


It's about getting married. Click here! Try it!