Re: Using fmgr_hook

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Sameer Thakur *EXTERN*" <samthakur74(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Using fmgr_hook
Date: 2014-08-26 07:59:58
Message-ID: A737B7A37273E048B164557ADEF4A58B17D2E4F5@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sameer Thakur wrote:
>> 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.

But gdb tells you that it cannot set the breakpoint correctly
when you try to, right?

Try like this:
- connect with psql
- call your custom_fmgr_hook
- attach to the backend with gdb
- set the breakpoint
- call custom_fmgr_hook again

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ramesh T 2014-08-26 09:41:52 Re: POWA tool
Previous Message K P Manoj 2014-08-26 05:59:31 Re: PostgreSQL DB Replication