Re: Block-level CRC checks
| От | Aidan Van Dyk |
|---|---|
| Тема | Re: Block-level CRC checks |
| Дата | |
| Msg-id | 20081118173406.GE31053@yugib.highrise.ca обсуждение исходный текст |
| Ответ на | Re: Block-level CRC checks (Alvaro Herrera <alvherre@commandprompt.com>) |
| Ответы |
Re: Block-level CRC checks
|
| Список | pgsql-hackers |
* Alvaro Herrera <alvherre@commandprompt.com> [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 maybeCRC?) write buffered page -- aidan van dyk create like a god, aidan@highrise.ca command like a king, http://www.highrise.ca/ work like a slave.
В списке pgsql-hackers по дате отправления: