Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Dmitry Ivanov <d(dot)ivanov(at)postgrespro(dot)ru>, Shubham Barai <shubhambaraiss(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Borodin <amborodin86(at)gmail(dot)com>, Kevin Grittner <kgrittn(at)gmail(dot)com>
Subject: Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)
Date: 2018-04-09 15:21:30
Message-ID: 37BD51A9-5AE4-471D-A3D1-0C98A0009ED1@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www


> 9 апр. 2018 г., в 19:50, Teodor Sigaev <teodor(at)sigaev(dot)ru> написал(а):
>>
>> 3. Why do we *not* lock the entry leaf page, if there is no match? We still need a lock to remember that we probed for that value and there was no match, so that we conflict with a tuple that might be inserted later.
>> At least #3 is a bug. The attached patch adds an isolation test that demonstrates it. #1 and #2 are weird, and cause unnecessary locking, so I think we should fix those too, even if they don't lead to incorrect results.
>
> I can't find a hole here. Agree.
Please correct me if I'm wrong.
Let's say we have posting trees for word A and word B.
We are looking for a document that contains both.
We will read through all posting tree of A, but only through some segments of B.
If we will not find anything in B, we have to lock only segments where we actually were looking, not all the posting tree of B.

BTW I do not think that we lock ranges. We lock possibility of appearance of tuples that we might find. Ranges are shortcuts for places where we were looking.. That's how I understand, chances are I'm missing something.

Best regards, Andrey Borodin.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2018-04-09 15:23:14 Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)
Previous Message Alvaro Herrera 2018-04-09 15:04:31 Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

Browse pgsql-www by date

  From Date Subject
Next Message Teodor Sigaev 2018-04-09 15:23:14 Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)
Previous Message Alvaro Herrera 2018-04-09 15:04:31 Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)