Re: Multiple backends on a single physical database

From: Ragnar Kjørstad <postgres(at)ragnark(dot)vestdata(dot)no>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Chris Miles <chris_pg002(at)psychofx(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Multiple backends on a single physical database
Date: 2002-10-12 16:31:44
Message-ID: 20021012183144.L14731@vestdata.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ragnar Kjørstad 2002-10-12 16:34:24 Re: Multiple backends on a single physical database
Previous Message Tom Lane 2002-10-12 16:26:51 Re: Multiple backends on a single physical database