Re: [HACKERS] GSoC 2017: weekly progress reports (week 8) - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: [HACKERS] GSoC 2017: weekly progress reports (week 8)
Date
Msg-id CAPpHfdv9F_gKvXMj7WvAgjX0UrNmY8N5BvhVPpqBTc01QECBsw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] GSoC 2017: weekly progress reports (week 8)  (Shubham Barai <shubhambaraiss@gmail.com>)
Responses Re: [HACKERS] GSoC 2017: weekly progress reports (week 8)
List pgsql-hackers
Hi!

On Fri, Jul 28, 2017 at 7:58 AM, Shubham Barai <shubhambaraiss@gmail.com> wrote:
I am attaching a patch for predicate locking in SP-Gist index

I took a look over this patch.

newLeafBuffer = SpGistGetBuffer(index,
GBUF_LEAF | (isNulls ? GBUF_NULLS : 0),
Min(totalLeafSizes,
SPGIST_PAGE_CAPACITY),
&xlrec.initDest);
PredicateLockPageSplit(index,
BufferGetBlockNumber(current->buffer),
BufferGetBlockNumber(newLeafBuffer));

You move predicate lock during split only when new leaf page is allocated.  However SP-GiST may move items to the free space of another busy page during split (see other branches in doPickSplit()).  Your patch doesn't seem to handle this case correctly.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index
Next
From: Etsuro Fujita
Date:
Subject: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw