* Alvaro Herrera <[EMAIL PROTECTED]> [081118 12:25]: > I don't think it's a matter of hoy many writes or how much IO. The > question is locks. Right now we flip hint bits without taking any kind > of lock on the page. If we're going to WAL-log each hint bit change, > then we will need to lock the page to update the LSN. This will make > changing a hint bit a very expensive operation, and maybe a possible > cause for deadlocks.
Ya, that's obviously the worst option. > What my patch did was log hint bits in bulk. The problem of that > approach was precisely that it was not locking the logged page enough > (locking before setting the "this page needs hint bits logged" bit). Of > course, the trivial solution is just to lock the page before flipping > hint bits, but I don't know (and I doubt) whether it would really work > at all. But why can't you wal-log the hint bits from the "buffered" page. then your consitent. At least as consistent as the original write was. So you're CRC ends up being: Buffer the page Calculate CRC on the buffered page WAL (in bulk) the hint bits (and maybe CRC?) write buffered page -- aidan van dyk create like a god, [EMAIL PROTECTED] command like a king, http://www.highrise.ca/ work like a slave.
signature.asc
Description: Digital signature