> > Can the magic be, that kaio directly writes from user space memory to the 
> > disk ?
> 
> This makes more assumptions about the disk drive's behavior than I think
> are justified...

No, no assumption about the drive, only the kaio implementation, namely, that
the kaio implementation reads the user memory at a latest (for the implementation)
possible time.

> > Since in your case all transactions A-E want the same buffer written,
> > the memory (not it's content) will also be the same.
> 
> But no, it won't: the successive writes will ask to write different
> snapshots of the same buffer.

That is what I meant, yes. Should have better formulated memory location.

> > The problem I can see offhand is how the kaio system can tell which
> > transaction can be safely notified of the write,
> 
> Yup, exactly.  Whose snapshot made it down to (stable) disk storage?

That is something the kaio implementation could prbbly know in our scenario, 
where we iirc only append new records inside the page (don't modify anything 
up front). Worst thing that can happen is that the kaio is too pessimistic 
about what is already on disk (memory already written, but aio call not yet done).

Andreas

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to