Re: double-buffering page writes - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Re: double-buffering page writes
Date
Msg-id 20081023105338.B715.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to double-buffering page writes  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: double-buffering page writes
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> wrote:

> I'm trying to see if it makes sense to do the double-buffering of page
> writes before going further ahead with CRC checking.  I came up with the
> attached patch; it does the double-buffering inconditionally, because as
> it was said, it allows releasing the io_in_progress lock (and resetting
> BM_IO_IN_PROGRESS) early.

I have some comments about the double-buffering:

- Are there any performance degradation because of addtional memcpy? 8kB of memcpy seems not to be free.

- Is it ok to allocale dblbuf[BLCKSZ] as local variable? It might be unaligned. AFAICS we avoid such usages in other
places.

- It is the best if we can delay double-buffering until locks are conflicted actually. But we might need to allocale
shadowbuffers from shared buffers instead of local memory.
 

- Are there any other modules that can share in the benefits of double-buffering? For example, we could avoid avoid
waitingfor LockBufferForCleanup(). It is cool if the double-buffering can be used for multiple purposes.
 

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: ITAGAKI Takahiro
Date:
Subject: Re: pg_stat_statements in core
Next
From: Ran Tang
Date:
Subject: Can anyone explain to me how the "ps_OuterTupleSlot" in PlanState is being used in implementing HashJoin?