Re: PostgreSQL over NFS?

From: Alfred Perlstein <bright(at)wintelcom(dot)net>
To: Shaw Terwilliger <sterwill(at)sourcegear(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL over NFS?
Date: 2001-02-10 00:23:10
Message-ID: 20010209162310.Y26076@fw.wintelcom.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* Shaw Terwilliger <sterwill(at)sourcegear(dot)com> [010209 16:18] wrote:
> Alfred Perlstein wrote:
> > Actually NFS has very strong write ordering semantics, it just has
> > terrible cache coherency. Meaning two machines accessing the same
> > file will most likely see different things if the file is updated
> > moderately.
>
> I'm not an NFS guru by any means, but I've noticed episodes of cache
> incoherency from NFS-mounted home directories on two workstations.
> Running two postgresql database servers on two hosts accessing the
> same data space through NFS sounds like asking for corruption, and
> was, luckily, never suggested.

My statement is also incorrect, NFS has loose write ordering
semantics, but it does have strong reliability, meaning that
fsync(2)/close(2) must sync all data to backing NFS server or return
an error.

The part about cache incoherency is very true, the _only_ cache coherency
NFS offers is _only_ in the v3 spec, and is specifically called 'wcc'
'weak cache coherency' (afaik). So yes, you can expect differnent
NFS clients to get different inconsistant views on heavily modified
files unless they use advisory locking (which should fsync out locked
ranges before release).

Anyhow, if the idea is just to get a nice backup system, you could
do a pg_dump and write the output to a NFS mounted FS, there's probably
less that can go wrong with a large sequencial write than heavy shared
read/write/seek.

--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
"I have the heart of a child; I keep it in a jar on my desk."

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alfonso Peniche 2001-02-10 00:23:59 bug with distinct?
Previous Message Shaw Terwilliger 2001-02-10 00:20:45 Failover (was Re: PostgreSQL over NFS?)