xlog.c: WALInsertLock vs. WALWriteLock

From: fazool mein <fazoolmein(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: xlog.c: WALInsertLock vs. WALWriteLock
Date: 2010-10-22 19:08:54
Message-ID: AANLkTi=ACDiafVTNZVt4+zZ28OZmOKTcvpMeJZRg0ezw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.
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?

Thanks a lot.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-10-22 19:12:54 Re: Integer input functions for date and timestamp
Previous Message Peter Geoghegan 2010-10-22 18:58:29 Re: Integer input functions for date and timestamp