Re: the number of file descriptors when using POSIX semaphore

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: the number of file descriptors when using POSIX semaphore
Дата
Msg-id 9111.1293567523@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: the number of file descriptors when using POSIX semaphore  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> flyusa2010 fly wrote:
>> in src/template/darwin:
>> 
>> # Select appropriate semaphore support. Darwin 6.0 (Mac OS X 10.2) and up
>> # support System V semaphores; before that we have to use POSIX semaphores,
>> # which are less good for our purposes because they eat a file descriptor
>> # per backend per max_connection slot.

>> So, what would the number of file descriptors be, when using POSIX
>> semaphore?

> I thought the text was wrong, but this commit reinforces that text:

The text is correct, or at least as correct as it's possible to get
without expending three times the verbiage.  If you look in
InitProcGlobal you will find that the postmaster creates MaxConnections
plus autovacuum_max_workers + 1 plus NUM_AUXILIARY_PROCS semaphores.
In a POSIX-semaphores implementation, each of these eats a file
descriptor in the postmaster, plus another file descriptor in each child
process of the postmaster.

The OP claims the text is wrong, but since he failed to state what he
observed, it's pretty hard to comment further.
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: "writable CTEs"
Следующее
От: Gurjeet Singh
Дата:
Сообщение: Re: pg_dump --split patch