Re: xlog.c: WALInsertLock vs. WALWriteLock

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: fazool mein <fazoolmein(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: xlog.c: WALInsertLock vs. WALWriteLock
Date: 2010-10-27 19:53:29
Message-ID: AANLkTi=jB9Up-GKS94JsZNHQG7+2RUt-CWDSL3-NfVYr@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 27, 2010 at 3:03 AM, fazool mein <fazoolmein(at)gmail(dot)com> wrote:
>
>> Might I suggest adopting the same technique walsender does, ie just read
>> the data back from disk?  There's a reason why we gave up trying to have
>> walsender read directly from the buffers.
>>
>
> That is exactly what I do not want to do, i.e. read from disk, as long as
> the piece of WAL is available in the buffers.

I implemented before the patch which makes walsender read WAL from the buffer
without holding neither WALInsertLock nor WALWriteLock. That might be helpful
for you. Please see the following post.
http://archives.postgresql.org/pgsql-hackers/2010-06/msg00661.php

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2010-10-27 20:42:42 Re: max_wal_senders must die
Previous Message Jesper Krogh 2010-10-27 19:47:23 Re: Postgres insert performance and storage requirement compared to Oracle