Re: Using fmgr_hook

From: Sameer Thakur <samthakur74(at)gmail(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Using fmgr_hook
Date: 2014-08-25 13:40:05
Message-ID: CABzZFEsRXpFuTrnQKahJg_Jz+v9X=Dmk03Uc5AbBKzJox-Jitw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-08-25 13:42:18 Re: how to query against nested hstore data type
Previous Message W. Matthew Wilson 2014-08-25 13:32:11 Re: How to insert either a value or the column default?