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

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Shubham Barai <shubhambaraiss(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: 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:41:36
Message-ID: 3496ace5-a5bf-8b36-a177-53c24b118e77@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2017-06-21 07:42:46 Re: GSoC 2017 : Patch for predicate locking in Gist index
Previous Message Thomas Munro 2017-06-21 06:32:30 Re: Regarding Postgres Dynamic Shared Memory (DSA)