3 ms·
There's no way to recover from a failed write (if the drive is still operating and could reallocate the sector, it would have already done that). So mark the pa
by toothpasta 9y ago
There's no way to recover from a failed write (if the drive is still operating and could reallocate the sector, it would have already done that). So mark the pages damaged and deallocate their contents. Keep the metadata for the damaged pages around until someone tries to sync or close the associated file.
- zAy0LfpBZLC8mAC 9y agoA write() can fail because a device read fails when the write() is not aligned on sector/page boundaries.
- caf 9y agoThere's no way to recover from a failed write (if the drive is still operating and could reallocate the sector, it would have already done that). That's not exactly true. In the thin-provisioned block device case, administrator action can make it resume accepting writes.
- cesarb 9y agoThe whole issue is that postgres wants to know about the failed write, because if it knows it can recover from it, by failing over to a slave.