Re: Block-level CRC checks
От | Gregory Stark |
---|---|
Тема | Re: Block-level CRC checks |
Дата | |
Msg-id | 87vdwbevxq.fsf@oxford.xeocode.com обсуждение исходный текст |
Ответ на | Re: Block-level CRC checks (pgsql@mohawksoft.com) |
Ответы |
Re: Block-level CRC checks
|
Список | pgsql-hackers |
pgsql@mohawksoft.com writes: > If you are going to double buffer, one presumes that for some non-zero > period of time, the block must be locked during which it is copied. You > wouldn't want it changing "mid-copy" would you? How is this any less of a > hit than just calculating the checksum? a) You wouldn't have to keep the lock while doing the I/O. Once the CRC+copy is done you can release the lock secure in the knowledge that nobody is going to modify your buffered copy before the kernel can grab its copy. b) You don't have to worry about hint bits being modified underneath you. As long as the CRC+copy is carefully written to copy whole atomic-sized words/bytes and only read the original once then it won't matter if it catches the hint bit before or after it's set. The CRC will reflect the value buffered and eventually written. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services!
В списке pgsql-hackers по дате отправления: