Re: Index use during Hot Standby

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Index use during Hot Standby
Date: 2008-10-20 14:24:09
Message-ID: 48FC9489.9060405@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hitoshi Harada 2008-10-20 14:24:11 Re: Window Functions: buffering strategy
Previous Message Peter Eisentraut 2008-10-20 14:14:18 Re: crypt auth