Re: Analysis of ganged WAL writes

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Curtis Faith" <curtis(at)galtair(dot)com>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Hannu Krosing" <hannu(at)tm(dot)ee>, "Pgsql-Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Analysis of ganged WAL writes
Date: 2002-10-08 16:06:29
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA4961EB7@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-10-08 16:08:37 Re: inline newNode()
Previous Message Bruce Momjian 2002-10-08 16:04:35 Re: inline newNode()