Re: Getting list of held lwlocks from debugger - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Getting list of held lwlocks from debugger
Date
Msg-id 16086.1405433842@sss.pgh.pa.us
Whole thread Raw
In response to Getting list of held lwlocks from debugger  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes:
> Is there an easy way to get a list of held lwlocks out of gdb attached to a
> core dump (or for that matter attached to a live process)?

There's the held_lwlocks array in lwlock.c, but that will just give you
pointers.  What I imagine you're wishing for is some symbolic display
of which locks they are, and I see no code for that.

The "lock tranche" infrastructure that Robert's been working on would
allow for reasonably decent printout, but it's not complete yet ...
        regards, tom lane



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [bug fix] pg_ctl always uses the same event source
Next
From: Tom Lane
Date:
Subject: Re: returning SETOF RECORD