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

From: Shubham Barai <shubhambaraiss(at)gmail(dot)com>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: Andrew Borodin <amborodin86(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Kevin Grittner <kgrittn(at)gmail(dot)com>
Subject: Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index
Date: 2017-11-29 17:50:36
Message-ID: CALxAEPuiXm7e0Y+wfxXMgoYG6OKL=Hm_smWw7OAkD7TkoWfb2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 27 November 2017 at 13:17, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
wrote:

> Hi, Shubham!
>
> On Wed, Nov 1, 2017 at 12:10 AM, Shubham Barai <shubhambaraiss(at)gmail(dot)com>
> wrote:
>
>> On 9 October 2017 at 18:57, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru
>> > wrote:
>>
>>> Now, ITSM that predicate locks and conflict checks are placed right for
>>> now.
>>> However, it would be good to add couple comments to gistdoinsert() whose
>>> would state why do we call CheckForSerializableConflictIn() in these
>>> particular places.
>>>
>>> I also take a look at isolation tests. You made two separate test
>>> specs: one to verify that serialization failures do fire, and another to
>>> check there are no false positives.
>>> I wonder if we could merge this two test specs into one, but use more
>>> variety of statements with different keys for both inserts and selects.
>>>
>>
>> Please find the updated version of patch here. I have made suggested
>> changes.
>>
>
> In general, patch looks good for me now. I just see some cosmetic issues.
>
> /*
>> + *Check for any r-w conflicts (in serialisation isolation level)
>> + *just before we intend to modify the page
>> + */
>> + CheckForSerializableConflictIn(r, NULL, stack->buffer);
>> + /*
>
>
> Formatting doesn't look good here. You've missed space after star sign in
> the comment. You also missed newline after CheckForSerializableConflictIn()
> call.
>
> Also, you've long comment lines in predicate-gist.spec. Please, break
> long comments into multiple lines.
>
>
I have fixed formatting style. Please take a look at updated patch.

Regards,
Shubham

>
>

Attachment Content-Type Size
Predicate-locking-in-gist-index_5.patch text/x-patch 33.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-11-29 18:22:50 Re: [HACKERS] static assertions in C++
Previous Message Andres Freund 2017-11-29 16:55:02 Re: using index or check in ALTER TABLE SET NOT NULL