On Tue, Jun 30, 2015 at 6:25 AM, Peter Geoghegan <p...@heroku.com> wrote:
>
> On Mon, Jun 29, 2015 at 5:37 PM, Jeff Janes <jeff.ja...@gmail.com> wrote:
> > Is there a way to use gdb to figure out who holds the lock they are
waiting
> > for?
>
> Have you considered building with LWLOCK_STATS defined, and LOCK_DEBUG
> defined? That might do it.
>

If you define LOCK_DEBUG, then you can check owner of the
lock [1], which will tell you about the Exclusive owner of that lock
and can help you in debugging the problem.


[1]
#ifdef LOCK_DEBUG
struct PGPROC *owner; /* last exlusive owner of the lock */
#endif
} LWLock;


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Reply via email to