Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Apr 2006 10:17:18 -0400
From:      Vivek Khera <vivek@khera.org>
To:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: [HACKERS] semaphore usage "port based"?
Message-ID:  <136F2379-153C-4013-BEC1-2BBA36129810@khera.org>
In-Reply-To: <20060403205630.N947@ganymede.hub.org>
References:  <Pine.GSO.4.43.0604030817090.21105-100000@sea.ntplx.net> <20060403140902.C947@ganymede.hub.org> <20060403182504.S76562@fledge.watson.org> <20060403144916.J947@ganymede.hub.org> <20060403230850.P76562@fledge.watson.org> <20060403205630.N947@ganymede.hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Apr 3, 2006, at 8:07 PM, Marc G. Fournier wrote:

> All PostgreSQL processes use "port * 1000" as their starting port  
> for semId ... if "port * 1000" is reported as in use, the first  
> thing that the PostgreSQL process does is kill(PID, 0) the PID  
> returned by semctl(GETPID) to see if, in fact, there is a process  
> running ... if not, PostgreSQL reuses that semaphore, if not, it  
> goes to (port*1000)+1, and tries again ... until it can find a free  
> semaphore that isn't in use ...

Perhaps you can hack into the postgresql master a flag that alters  
the "1000" parameter, or starts at a port * 1000 + N, then hard-code  
that flag into your startup script per jail.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?136F2379-153C-4013-BEC1-2BBA36129810>