Re: Using fmgr_hook - Mailing list pgsql-general

From Sameer Thakur
Subject Re: Using fmgr_hook
Date
Msg-id CABzZFEsRXpFuTrnQKahJg_Jz+v9X=Dmk03Uc5AbBKzJox-Jitw@mail.gmail.com
Whole thread Raw
In response to Re: Using fmgr_hook  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Responses Re: Using fmgr_hook
List pgsql-general
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


pgsql-general by date:

Previous
From: "W. Matthew Wilson"
Date:
Subject: Re: How to insert either a value or the column default?
Next
From: Adrian Klaver
Date:
Subject: Re: how to query against nested hstore data type