Date: Mon, 3 Apr 2006 14:22:23 -0400 From: Vivek Khera <vivek@khera.org> To: freebsd-stable <freebsd-stable@freebsd.org> Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] semaphore usage "port based"? Message-ID: <A1072D0B-7416-493C-8CCC-C9126134A9B3@khera.org> In-Reply-To: <14654.1144082224@sss.pgh.pa.us> References: <20060402163504.T947@ganymede.hub.org> <25422.1144016604@sss.pgh.pa.us> <25526.1144017388@sss.pgh.pa.us> <20060402213921.V947@ganymede.hub.org> <26524.1144026385@sss.pgh.pa.us> <20060402222843.X947@ganymede.hub.org> <26796.1144028094@sss.pgh.pa.us> <20060402225204.U947@ganymede.hub.org> <26985.1144029657@sss.pgh.pa.us> <20060402231232.C947@ganymede.hub.org> <27148.1144030940@sss.pgh.pa.us> <20060402232832.M947@ganymede.hub.org> <20060402234459.Y947@ganymede.hub.org> <27417.1144033691@sss.pgh.pa.us> <20060403164139.D36756@fledge.watson.org> <14654.1144082224@sss.pgh.pa.us>
index | next in thread | previous in thread | raw e-mail
On Apr 3, 2006, at 12:37 PM, Tom Lane wrote: > semaphore keys on each cycle of life, so you'd have to get fooled by > chance coincidence of existing PIDs every time over many cycles to > have a severe resource-leakage problem. (BTW, Marc, that's the reason > for *not* randomizing the key selection as you suggested.) Seems to me the way around this with minimal fuss is to add a flag to postgres to have it start at different points in the ID sequence. So pg#1 would start at first position, pg#2 second ID position, etc. then just hard-code an "instance ID" into the startup script for each pg. No randomization make it easier to debug, and unique IDs make it avoid clashes under normal cases.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A1072D0B-7416-493C-8CCC-C9126134A9B3>
