GiST concurrency

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема GiST concurrency
Дата
Msg-id 42B7FA4C.9010107@sigaev.ru
обсуждение исходный текст
Ответы Re: GiST concurrency  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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
changeddata 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: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alfranio Correia Junior
Дата:
Сообщение: Re: HOOKS for Synchronous Replication
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: query plan ignoring check constraints