Re: Buffer Management
От | Tom Lane |
---|---|
Тема | Re: Buffer Management |
Дата | |
Msg-id | 8765.1025023371@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Buffer Management (Bradley McLean <brad@bradm.net>) |
Список | pgsql-hackers |
Bradley McLean <brad@bradm.net> writes: > Okay, so instead of looking for constraints from the OS on the data file, > use the constraints on the WAL file. It would work at the cost of a buffer > copy? Er, maybe two: > mmap the data file and WAL separately. > Copy the data file page to the WAL mmap area. > Modify the page. > msync() the WAL. > Copy the page to the data file mmap area. > msync() or not the data file. Huh? The primary argument in favor of mmap is to avoid buffer copies; seems like you are paying that price anyway. Also, we do not want to msync WAL for every single WAL record, but I think you'd have to with the above scheme. (Assuming you have adequate shared buffer space, the present scheme only has to fsync WAL at transaction commit and checkpoints, because it won't actually push out data pages except at checkpoint time.) regards, tom lane
В списке pgsql-hackers по дате отправления: