pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Smith <gsmith@gregsmith.com>
Cc: James Mansion <james@mansionfamily.plus.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: POSIX file updates
Date: Tue, 01 Apr 2008 01:07:17 -0400
Message-ID: <20606.1207026437@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.GSO.4.64.0803311618040.15117@westnet.com>
References: <47F1413B.40109@mansionfamily.plus.com>
	<Pine.GSO.4.64.0803311618040.15117@westnet.com>

Greg Smith <gsmith@gregsmith.com> writes:
> Quoting from Lewine's "POSIX Programmer's Guide":

> "After a write() to a regular file has successfully returned, any 
> successful read() from each byte position in the file that was modified by 
> that write() will return the data that was written by the write()...a 
> similar requirement applies to multiple write operations to the same file 
> position"

Yeah, I imagine this is what the OP is thinking of.  But note that what
it describes is the behavior of concurrent write() and read() calls
within a normally-functioning system.  I see nothing there that
constrains the order in which writes hit physical disk, nor (to put it
another way) that promises anything much about the state of the
filesystem after a crash.

As you stated, PG is largely independent of these issues anyway.  As
long as the filesystem honors its spec-required contract that it won't
claim fsync() is complete before all the referenced data is safely on
persistent store, we are OK.

			regards, tom lane



view thread (14+ messages)  latest in thread

Message-ID: <20606.1207026437@sss.pgh.pa.us>
Permalink:  ../20606.1207026437@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20606.1207026437@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, gsmith@gregsmith.com, james@mansionfamily.plus.com
  Subject: Re: POSIX file updates
  In-Reply-To: <20606.1207026437@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