Re: strange update problem with 7.2.1 - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: strange update problem with 7.2.1
Date
Msg-id 3CF39D8E.5030204@stack.net
Whole thread Raw
In response to Re: strange update problem with 7.2.1  (Oleg Bartunov <oleg@sai.msu.su>)
Responses Re: strange update problem with 7.2.1  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:
> Teodor Sigaev <teodor@stack.net> writes:
> 
>>>Hmm, is this patch really correct?  Removing the gistadjscans() call
>>>from gistSplit seems wrong to me --- won't that miss reporting splits
>>>on leaf pages?  Or does this not matter for some reason?
>>
> 
>>gistadjscans() is moving to gistlayerinsert. gistadjscans() must be
>>called for parent of splitted page, but gistSplit doesn't know parent
>>of current page and gistlayerinsert return status of its action:
>>inserted and (may be) splitted. So we can call
>>gistadjscans(GIST_SPLIT) in gistlayerinsert when it's need.
> 
> 
> But gistSplit is recursive.  Is there no need to worry about the
> additional splits it might do internally?

Internally splits are doing before calling gistadjscans. All pages 
created by gistSplit will be inserted in the end of parent page.
GiST's indexes aren't a concurrent there for one call of gistadjscans 
will be sufficiant.






pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: cache lookup failed: hack pg_* tables?
Next
From: Tom Lane
Date:
Subject: Re: strange update problem with 7.2.1