Re: Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock(PG10.7)

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock(PG10.7)
Дата
Msg-id CAPpHfduQdEVcZrJhceU01zfa5dYrw8oc5f1m8NNGSYM8VFS3GA@mail.gmail.com
обсуждение исходный текст
Ответ на Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock(PG10.7)  (chenhj <chjischj@163.com>)
Ответы Re: Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock(PG10.7)  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Re: Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock(PG10.7)  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
Hi!

Thank you for reporting.

On Sun, Sep 29, 2019 at 11:17 AM chenhj <chjischj@163.com> wrote:
> Does the locking order of autovacuum process(root->right->left) correct? While insert process lock gin buffer by
orderof bottom->top and left->right.
 
>
> 1. vacuum(root->right->left):

Starting from root seems OK for me, because vacuum blocks all
concurrent inserts before doing this.  But this needs to be properly
documented in readme.

Locking from right to left is clearly wrong.  It could deadlock with
concurrent ginStepRight(), which locks from left to right.  I expect
this happened in your case.  I'm going to reproduce this and fix.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



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

Предыдущее
От: chenhj
Дата:
Сообщение: Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock(PG10.7)
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock(PG10.7)