Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group