Re: xlog.c: WALInsertLock vs. WALWriteLock

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: xlog.c: WALInsertLock vs. WALWriteLock
Дата
Msg-id 20101023201743.GB20820@fetter.org
обсуждение исходный текст
Ответ на xlog.c: WALInsertLock vs. WALWriteLock  (fazool mein <fazoolmein@gmail.com>)
Ответы Re: xlog.c: WALInsertLock vs. WALWriteLock  (Tallat Mahmood <tallat.mahmood@gmail.com>)
Список pgsql-hackers
On Fri, Oct 22, 2010 at 12:08:54PM -0700, fazool mein wrote:
> Hello guys,
> 
> I'm writing a function that will read data from the buffer in xlog
> (i.e.  from XLogCtl->pages and XLogCtl->xlblocks).  I want to make
> sure that I am doing it correctly.

Got an example of what the function might look like?

> For reading from the buffer, do I need to lock WALInsertLock or
> WALWriteLock?  Also, can you explain a bit the usage of 'LW_SHARED'.
> Can we use it for read purposes?

Help me understand.  Do you foresee some kind of concurrency issue,
and if so, what?

Cheers,
David.
> 
> Thanks a lot.

-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


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

Предыдущее
От: "A.M."
Дата:
Сообщение: create c function with void argument bug?
Следующее
От: Boxuan Zhai
Дата:
Сообщение: Re: ask for review of MERGE