Subject: Re: PostgreSQL, NetBSD and NFS
To: D'Arcy J.M. Cain <firstname.lastname@example.org>
From: Greg A. Woods <email@example.com>
Date: 01/31/2003 14:07:09
[ On Friday, January 31, 2003 at 11:54:27 (-0500), D'Arcy J.M. Cain wrote: ]
> Subject: Re: PostgreSQL, NetBSD and NFS
> On Thursday 30 January 2003 18:32, Simon J. Gerraty wrote:
> > Is postgreSQL trying to lock a file perhaps? Would seem a sensible thing
> > for it to be doing...
> Is that a problem? FWIW I am running statd and lockd on the NetBSD box.
NetBSD's NFS implementation only supports locking as a _server_, not a
Optional for file locking (lockd+statd):
Rpc.lockd is a daemon which provides file and record-locking services
in an NFS environment.
FreeBSD, NetBSD and OpenBSD file locking is only supported on server
NFS server support for locking was introduced in NetBSD-1.5:
* Server part of NFS locking (implemented by rpc.lockd(8)) now works.
and as you can also see from rcp.lockd/lockd.c:
date: 2000/06/07 14:34:40; author: bouyer; state: Exp; lines: +67 -25
Implement file locking in lockd. All the stuff is done in userland, using
fhopen() and flock(). This means that if you kill lockd, all locks will
be relased (but you're supposed to kill statd at the same time, so
remote hosts will know it and re-establish the lock).
Tested against solaris 2.7 and linux 2.2.14 clients.
Shared lock are not handled efficiently, they're serialised in lockd when they
could be granted.
Terry Lambert has some proposed fixes to add NFS client level locking to
the FreeBSD kernel:
Greg A. Woods
+1 416 218-0098; <firstname.lastname@example.org>; <email@example.com>
Planix, Inc. <firstname.lastname@example.org>; VE3TCP; Secrets of the Weird <email@example.com>