Re: 8192 BLCKSZ ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 8192 BLCKSZ ?
Date
Msg-id 10411.975446674@sss.pgh.pa.us
Whole thread Raw
In response to Re: 8192 BLCKSZ ?  (Nathan Myers <ncm@zembu.com>)
Responses Re: 8192 BLCKSZ ?  (Nathan Myers <ncm@zembu.com>)
Re: 8192 BLCKSZ ?  (Matthew Kirkwood <matthew@hairy.beasts.org>)
List pgsql-hackers
Nathan Myers <ncm@zembu.com> writes:
> In the event of a power outage, the drive will stop writing in
> mid-sector.

Really?  Any competent drive firmware designer would've made sure that
can't happen.  The drive has to detect power loss well before it
actually loses control of its actuators, because it's got to move
the heads to the safe landing zone.  If it checks for power loss and
starts that shutdown process between sector writes, never in the middle
of one, voila: atomic writes.

Of course, there's still no guarantee if you get a hardware failure
or sector write failure (recovery from the write failure might well
take longer than the drive has got).  But guarding against a plain
power-failure scenario is actually simpler than doing it the wrong
way.

But, as you say, customary page sizes are bigger than a sector, so
this is all moot for our purposes anyway :-(
        regards, tom lane


pgsql-hackers by date:

Previous
From: Nathan Myers
Date:
Subject: Re: 8192 BLCKSZ ?
Next
From: Nathan Myers
Date:
Subject: Re: 8192 BLCKSZ ?