Re: pgsql: Add kqueue(2) support to the WaitEventSet API.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Add kqueue(2) support to the WaitEventSet API.
Дата
Msg-id 20263.1582228617@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Add kqueue(2) support to the WaitEventSet API.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql: Add kqueue(2) support to the WaitEventSet API.  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
I wrote:
> It seems fairly obvious now that I look at it, but: the epoll and kqueue
> variants of CreateWaitEventSet are both *fundamentally* unsafe, because
> they assume that they can always get a FD when they want one, which is
> not a property that we generally want backend code to have.  The only
> reason we've not seen this before with epoll is a lack of testing
> under lots-of-FDs stress.
> The fact that they'll likely leak those FDs on subsequent failures is
> another not-very-nice property.

Hmmm ... actually, there's a third problem, which is the implicit
assumption that we can have as many concurrently-active WaitEventSets
as we like.  We can't, if they depend on FDs --- that's a precious
resource.  It doesn't look like we actually ever have more than about
two per process right now, but I'm concerned about what will happen
as the usage of the feature increases.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Add kqueue(2) support to the WaitEventSet API.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Add PGURI env var for passing connection string to psql in Docker