Thread: How to do the modular test

How to do the modular test

From
Werachart Jantarataeme
Date:
Hi pgsql-hackers,
  Could anyone advise me how to do modular test in any partial
PostgreSQL's modules?  I am interested in the PostgreSQL development. I have begun study the
DBMS source code by developer documentation provided by postgresql.org
especially internal.ps that is the best explaination for developer
beginner, I think.   Moreover, the RedHat SourceNavigator I have found, is a great tools for
me.  Without it, I might not able to get more understanding of the
PostgreSQL source code.  Now I am concentrating on the Executor module. I plan to create a new
Join Executor let's say ParallelJoin to enhance the Join operator
processing.  As this moment, I may use the HybridJoin algorithm
implementing in the HashJoin module as my guidance but the NestLoop and
MergeJoin may be considered in the furture.
  What I would like to know is, if I have changed some ot the modules,
how can I use GNU gdb to debug the modified codes?
  I am sorry if the question is disturb your mailing list. I know this is
not the issue related in your TODO list. However I have expected to your
response.
  thanks and regards,  Werachart.  



Re: How to do the modular test

From
Thomas Lockhart
Date:
>    What I would like to know is, if I have changed some ot the modules,
> how can I use GNU gdb to debug the modified codes?

You can run the backend directly from gdb:
$ gdb postgres(set breakpoint)> b <routine_to_breakpoint>(tell gdb to begin)> run -D <path_to_database>(enter query at
prompt)> select xyz from abc...(will run until it hits the breakpoint(s))
 
                  - Thomas