pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ragnar Kjørstad <postgres@ragnark.vestdata.no>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Chris Miles <chris_pg002@psychofx.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Multiple backends on a single physical database
Date: Sat, 12 Oct 2002 18:31:44 +0200
Message-ID: <20021012183144.L14731@vestdata.no> (raw)
In-Reply-To: <200210121511.g9CFBs619940@candle.pha.pa.us>
References: <20021012160610.I6712@psychofx.com>
	<200210121511.g9CFBs619940@candle.pha.pa.us>

On Sat, Oct 12, 2002 at 11:11:53AM -0400, Bruce Momjian wrote:
> Chris Miles wrote:
> > On Thu, Oct 10, 2002 at 10:09:55AM -0400, Bruce Momjian wrote:
> > > We also don't recommend NFS directories because the NFS file behavior is
> > > not 100% the same as a local file system.
> > 
> > Can you comment on what the incompatabities are?  (related to PostgreSQL
> > only).
> > 
> > We currently run PostgreSQL on Linux servers with the data on dedicated
> > Netapp filers over NFS.  We have had no problems so far and performance
> > is very acceptable.
> > 
> > If there is something I need to watch out for, I would like to know.
> 
> Good question.  It is my understanding that fsync, locking, and the
> order of writes is not guaranteed in NFS like it is for local file
> systems.  I question how well it would handle any of the failure modes
> that local file systems can withstand.

1. fsync will work over nfs if it's configured properly.
   Use nfs version 3. Don't use "async" mount option; be awere
   that async used to be default at least on linux.
   I'm not sure about fdatasync or O_SYNC methods.

2. I don't know what locking, if any, postgresql uses. Flock does not
   work over NFS at all. Fcntl works, if both the server and the client
   runs the lock-deamon.

3. order of writes is not guaranteed either locally or over NFS; that's
   why fsync is used to enforce it when postgresql requires a specific
   write-order.


So; postgresql over NFS should be safe if you are aware of the pitfalls,
either with NetApp or other NFS-servers (but make sure the nfs-server as
well as the client follows the "rules").

That's not to say it's a good idea - running postgresql over NFS is
slower and more expensive than running it on local storage.



-- 
Ragnar Kjørstad
Big Storage



view thread (13+ messages)  latest in thread

Message-ID: <20021012183144.L14731@vestdata.no>
Permalink:  ../20021012183144.L14731@vestdata.no/
Also on:    postgresql.org/message-id/20021012183144.L14731@vestdata.no

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: postgres@ragnark.vestdata.no, pgman@candle.pha.pa.us, chris_pg002@psychofx.com
  Subject: Re: Multiple backends on a single physical database
  In-Reply-To: <20021012183144.L14731@vestdata.no>
  References: <20021012160610.I6712@psychofx.com> <200210121511.g9CFBs619940@candle.pha.pa.us> <20021012183144.L14731@vestdata.no>

* 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