Re: GSoC 2017 : Patch for predicate locking in Gist index

From: Shubham Barai <shubhambaraiss(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Kevin Grittner <kgrittn(at)gmail(dot)com>, Andrew Borodin <amborodin86(at)gmail(dot)com>
Subject: Re: GSoC 2017 : Patch for predicate locking in Gist index
Date: 2017-06-21 07:52:50
Message-ID: CALxAEPt8REhBJA-zgQWorGKWqUqqCchxO-RyK06PJgSJmZYKbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 21 June 2017 at 13:11, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:

> On 06/16/2017 01:24 PM, Shubham Barai wrote:
>
>> @@ -497,6 +499,13 @@ gistplacetopage(Relation rel, Size freespace,
>> GISTSTATE *giststate,
>> for (ptr = dist->next; ptr; ptr = ptr->next)
>> UnlockReleaseBuffer(ptr->buffer);
>> }
>> +
>> + for (ptr = dist; ptr; ptr = ptr->next)
>> + PredicateLockPageSplit(rel,
>> +
>> BufferGetBlockNumber(buffer),
>> +
>> BufferGetBlockNumber(ptr->buffer));
>> +
>> +
>>
>
> I think this new code needs to go before the UnlockReleaseBuffer() calls
> above. Calling BufferGetBlockNumber() on an already-released buffer is not
> cool.
>
> - Heikki
>
> I know that. This is the old version of the patch. I had sent updated
patch later. Please have a look at updated patch.

Regards,
Shubham

<https://mailtrack.io/> Sent with Mailtrack
<https://mailtrack.io/install?source=signature&lang=en&referral=shubhambaraiss(at)gmail(dot)com&idSignature=22>

Attachment Content-Type Size
Predicate-Locking-in-Gist-index_2.patch application/octet-stream 31.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jasrajd 2017-06-21 07:57:32 Re: An attempt to reduce WALWriteLock contention
Previous Message Mahendranath Gurram 2017-06-21 07:43:28 Re: Regarding Postgres Dynamic Shared Memory (DSA)