Re: I/O on select count(*)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matthew Wakeling <matthew(at)flymine(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: I/O on select count(*)
Date: 2008-05-15 14:52:58
Message-ID: 4758.1210863178@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Matthew Wakeling <matthew(at)flymine(dot)org> writes:
> Hmm. That problem is what WAL full-page-writes is meant to handle, isn't
> it? So basically, if you're telling people that WAL full-page-writes is
> safer than partial WAL, because it avoids updating pages in-place, then
> you shouldn't be updating pages in-place for the hint bits either. You
> can't win!

This argument ignores the nature of the data change. With a hint-bit
update, no data is being shuffled around, so there is no danger from a
partial page write.

A disk that leaves an individual sector corrupt would be a problem,
but I don't think that's a huge risk. Keep in mind that disks aren't
designed to just stop dead when power dies --- they are made to be able
to park their heads before the juice is entirely gone. I think it's
reasonable to assume they'll finish writing the sector in progress
before they start parking.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Craig James 2008-05-15 14:57:01 Re: which ext3 fs type should I use for postgresql
Previous Message Alvaro Herrera 2008-05-15 14:41:06 Re: I/O on select count(*)