Re: Potential Large Performance Gain in WAL synching
От
Neil Conway
Тема
Re: Potential Large Performance Gain in WAL synching
Дата
Msg-id
873crlajs0.fsf@mailbox.samurai.com
Ответ на
Re: Potential Large Performance Gain in WAL synching (Curtis Faith)
Список
Дерево обсуждения
Use of sync() [was Re: Potential Large Performance Gain in WAL synching] Mats Lofkvist <mal@algonet.se>
Re: Use of sync() [was Re: Potential Large Performance Gain in WAL synching] Tom Lane <tgl@sss.pgh.pa.us>
"Curtis Faith" writes: > It looks to me like BufferAlloc will simply result in a call to > BufferReplace > smgrblindwrt > write for md storage manager objects. > > This means that a process will block while the write of dirty cache > buffers takes place. I think Tom was suggesting that when a buffer is written out, the write() call only pushes the data down into the filesystem's buffer -- which is free to then write the actual blocks to disk whenever it chooses to. In other words, the write() returns, the backend process can continue with what it was doing, and at some later time the blocks that we flushed from the Postgres buffer will actually be written to disk. So in some sense of the word, that I/O is asynchronous. Cheers, Neil -- Neil Conway || PGP Key ID: DB3C29FC
В списке pgsql-hackers по дате отправления