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)
Список
Дерево обсуждения
[HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Shubham Barai <shubhambaraiss@gmail.com>
Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Heikki Linnakangas <hlinnaka@iki.fi>
Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Heikki Linnakangas <hlinnaka@iki.fi>
Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Shubham Barai <shubhambaraiss@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 Andrew Borodin <amborodin86@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 Andrew Borodin <amborodin86@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 Shubham Barai <shubhambaraiss@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 Shubham Barai <shubhambaraiss@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 Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Shubham Barai <shubhambaraiss@gmail.com>
Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Andrey Borodin <x4mmm@yandex-team.ru>
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 Shubham Barai <shubhambaraiss@gmail.com>
Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Shubham Barai <shubhambaraiss@gmail.com>
Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Shubham Barai <shubhambaraiss@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 Shubham Barai <shubhambaraiss@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 Teodor Sigaev <teodor@sigaev.ru>
Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Andrey Borodin <x4mmm@yandex-team.ru>
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 Andrey Borodin <x4mmm@yandex-team.ru>
Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Teodor Sigaev <teodor@sigaev.ru>
Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Shubham Barai <shubhambaraiss@gmail.com>
Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Andrey Borodin <x4mmm@yandex-team.ru>
Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index Shubham Barai <shubhambaraiss@gmail.com>
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). However, page might be exclusively locked before. And in this case CheckForSerializableConflictInif (!xlocked)
{
LockBuffer(stack->buffer, GIST_UNLOCK);
LockBuffer(stack->buffer, GIST_EXCLUSIVE);
CheckForSerializableConflictIn(r, NULL, stack->buffer);
xlocked = true;() 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
Дата:
От: Pavel Stehule
Дата: