Re: semaphore usage "port based"?

Поиск
Список
Период
Сортировка
От Vivek Khera
Тема Re: semaphore usage "port based"?
Дата
Msg-id A1072D0B-7416-493C-8CCC-C9126134A9B3@khera.org
обсуждение исходный текст
Ответ на Re: semaphore usage "port based"?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Feature list for SQL:2003
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: semaphore usage "port based"?