Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index

Поиск
Список
Период
Сортировка
От Andrew Borodin
Тема Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index
Дата
Msg-id CAAhFRxgJ6p8wodCp1m8gK9moO09NSN=WoJnXt8c=cMVYXS+Mug@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Ответы Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Список pgsql-hackers
Hi, Alexander!

Thanks for looking into the patch!

On Thu, Sep 28, 2017 at 3:59 PM, Alexander Korotkov <a.korotkov@postgrespro.ru> wrote:


In gistdoinsert() you do CheckForSerializableConflictIn() only if page wasn't exclusively locked before (xlocked is false).

if (!xlocked)
{
LockBuffer(stack->buffer, GIST_UNLOCK);
LockBuffer(stack->buffer, GIST_EXCLUSIVE);
CheckForSerializableConflictIn(r, NULL, stack->buffer);
xlocked = true;

However, page might be exclusively locked before.  And in this case CheckForSerializableConflictIn() would be skipped.  That happens very rarely (someone fixes incomplete split before we did), but nevertheless.

if xlocked = true, page was already checked for conflict after setting exclusive lock on it's buffer.  I still do not see any problem here...

Best regards, Andrey Borodin.

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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: [HACKERS] proposal - Default namespaces for XPath expressions(PostgreSQL 11)
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] proposal - Default namespaces for XPath expressions(PostgreSQL 11)