Re: LWLock deadlock and gdb advice

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: LWLock deadlock and gdb advice
Дата
Msg-id CAA4eK1Kd5bk0XSGzcRoFpskyfBARO1nKgYQbKihAJ=b8voLYpw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: LWLock deadlock and gdb advice  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
On Tue, Jun 30, 2015 at 6:25 AM, Peter Geoghegan <pg@heroku.com> wrote:
>
> On Mon, Jun 29, 2015 at 5:37 PM, Jeff Janes <jeff.janes@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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: drop/truncate table sucks for large values of shared buffers
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: drop/truncate table sucks for large values of shared buffers