Re: Index use during Hot Standby - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: Index use during Hot Standby
Date
Msg-id 48FC9489.9060405@sigaev.ru
Whole thread Raw
In response to Index use during Hot Standby  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Index use during Hot Standby
List pgsql-hackers
> 3. Implement an extra indexAM API call that allows indexAM to decide
> when/if index is valid during recovery. This would also cover the second
> concern neatly in a single API call.
> 
> wait until after deadline to implement (2) or (3), in case somebody
> fixes this up in the next few weeks.
> 

IMHO, Without locking of pages in recovery mode Btree and GIN are not usable 
while incomplete split exists - there is  a nonconnected branch in tree.

GiST has similar issue - incomplete insert. One insertion in leaf page can 
produce updating of keys up to the root. During that split pages may occurs.
So, it's needed to add to gistxlog.c tracking of pages split to get exact 
knowledge about moments of unusability of index.

One more thing about GiST - when database is switched from recovery mode to the 
normal mode then it's needed to complete insertion in GiST and, possibly, vacuum 
index. Dig around GistBulkDeleteResult->needFullVacuum and gistContinueInsert()

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


pgsql-hackers by date:

Previous
From: "Hitoshi Harada"
Date:
Subject: Re: Window Functions: buffering strategy
Next
From: Teodor Sigaev
Date:
Subject: Re: Block level concurrency during recovery