[EMAIL PROTECTED] 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! -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers