pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matthew Wakeling <matthew@flymine.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: I/O on select count(*)
Date: Thu, 15 May 2008 10:52:58 -0400
Message-ID: <4758.1210863178@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.64.0805151421190.16756@aragorn.flymine.org>
References: <920841.71690.qm@web44808.mail.sp1.yahoo.com>
	<482B1D5F.EE98.0025.0@wicourts.gov>
	<Pine.GSO.4.64.0805142133250.27290@westnet.com>
	<20080515020553.GN9838@alvh.no-ip.org>
	<Pine.LNX.4.64.0805151245360.16756@aragorn.flymine.org>
	<482C320F.9070908@enterprisedb.com>
	<Pine.LNX.4.64.0805151421190.16756@aragorn.flymine.org>

Matthew Wakeling <matthew@flymine.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



view thread (54+ messages)  latest in thread

Message-ID: <4758.1210863178@sss.pgh.pa.us>
Permalink:  ../4758.1210863178@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4758.1210863178@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, matthew@flymine.org
  Subject: Re: I/O on select count(*)
  In-Reply-To: <4758.1210863178@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox