News for hackers. Stuff that matters.
Re:PostgreSQL's fsync surprise by toothpasta on Wednesday May 02, 2018 @10:03PM (#16982813)
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.
Re:PostgreSQL's fsync surprise by caf on Thursday May 03, 2018 @06:10AM (#16984617)
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).

That's not exactly true. In the thin-provisioned block device case, administrator action can make it resume accepting writes.

Re:PostgreSQL's fsync surprise by cesarb on Thursday May 03, 2018 @08:02AM (#16985139)
The 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.
Re:PostgreSQL's fsync surprise by zAy0LfpBZLC8mAC on Wednesday May 02, 2018 @11:53PM (#16983236)
A write() can fail because a device read fails when the write() is not aligned on sector/page boundaries.