Re: Analysis of ganged WAL writes

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB SD
Тема Re: Analysis of ganged WAL writes
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA4961EB7@m0114.s-mxs.net
обсуждение исходный текст
Ответ на Analysis of ganged WAL writes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Where to call SetQuerySnapshot
Следующее
От: Bruce Momjian
Дата:
Сообщение: Statistical Analysis, Vacuum, and Selectivity Restriction (PostGIS) (fwd)