Now I basically finished recovery for GiST (of course, it's need a hard testing)
and go to concurrency. As it described in Kornaker, Mohan and Hellerstein's
paper
(http://www.sai.msu.su/~megera/postgres/gist/papers/concurrency/sigmod97-gist.pdf)
it's need a way to get global LSN, in our case - XLogRecPtr of last changed
page. As I understand, I can't use ProcLastRecPtr because it is one-process
wide, I need value stored in shared memory. So, may I add method to xlog.c like
this:
/*
* The returning recptr is the beginning of the current record to fill.
* This value is already stored as LSN for changed data pages.
*/
XLogRecPtr
GetCurrentRecPtr(void) {
XLogCtlInsert *Insert = &XLogCtl->Insert;
XLogRecPtr RecPtr;
LWLockAcquire(WALInsertLock, LW_SHARED);
INSERT_RECPTR(RecPtr, Insert, Insert->curridx);
LWLockRelease(WALInsertLock);
return RecPtr;
}
--
Teodor Sigaev E-mail: [EMAIL PROTECTED]
WWW: http://www.sigaev.ru/
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org