Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D6C274763F7 for ; Sat, 12 Oct 2002 12:32:14 -0400 (EDT) Received: from stine.vestdata.no (stine.vestdata.no [195.204.68.10]) by postgresql.org (Postfix) with ESMTP id 320DB476360 for ; Sat, 12 Oct 2002 12:32:13 -0400 (EDT) Received: (from ragnark@localhost) by stine.vestdata.no (8.11.6/8.11.2) id g9CGVja30788; Sat, 12 Oct 2002 18:31:45 +0200 Date: Sat, 12 Oct 2002 18:31:44 +0200 From: =?iso-8859-1?Q?Ragnar_Kj=F8rstad?= To: Bruce Momjian Cc: Chris Miles , pgsql-admin@postgresql.org Subject: Re: Multiple backends on a single physical database Message-ID: <20021012183144.L14731@vestdata.no> References: <20021012160610.I6712@psychofx.com> <200210121511.g9CFBs619940@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i In-Reply-To: <200210121511.g9CFBs619940@candle.pha.pa.us>; from pgman@candle.pha.pa.us on Sat, Oct 12, 2002 at 11:11:53AM -0400 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/81 X-Sequence-Number: 5939 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