Re: Multiple backends on a single physical database - Mailing list pgsql-admin

From Ragnar Kjørstad
Subject Re: Multiple backends on a single physical database
Date
Msg-id 20021012183144.L14731@vestdata.no
Whole thread Raw
In response to Re: Multiple backends on a single physical database  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-admin
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

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Multiple backends on a single physical database
Next
From: Ragnar Kjørstad
Date:
Subject: Re: Multiple backends on a single physical database