Hello, Thank you for responding >My experience is that you cannot set breakpoints before the library >is loaded, so you first have to call a function in the library, then >you interrupt and set the breakpoint. I tried to do the following 1. Execute Postgres (now auto_explain is loaded) 2. Start a psql session and attach gdb to forked Postmaster process 3. Now set break point in custom_fmgr_hook 4. Execute select * from now(); Still the breakpoint gets skipped. Also i checked by putting a breakpoint in explain_ExecutorStart before starting Postgres (before auto_explain is loaded), and then started psql session, attached gdb and executed select* from now(), in this case the debugger does stop at the breakpoint. The strange thing is i could swear that i had got the debugger to stop in custom_fmgr_hook , just after i added custom_needs_fmgr_hook and had figured out that we need to use custom_needs_fmgr_hook and custom_fmgr_hook together. But i have not been able to reproduce that. So maybe there is something in what you say. I just cannot nail the sequence correctly regards Sameer -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general