First, compile the source code use ./configure –prefix=XXXX –enable-debug && CFLAGS=-O0
then make and make install.
IF you want to RESTART PG
Detected if there is an instance of Postgre server. If there is, kill it. use
to detect the pocess of postgresql and kill it.
here DATADIR and postgresqlDIR are your own directory.
IF you don’t want to RESTART PG
to test. Here test is your database name.
IF you want to debug contrib
make && make install in contrib/yourdir
then go to gdb to file your shard lib to load symbol. Here XXX.so is your contrib share lib.
if not, when you use break somefunction, it will report:
No symbol table is loaded. Use the “file” command.
Make breakpoint pending on future shared library load? (y or [n])