Question: Why Are File Descriptors Not Closed and Accounted for PostgreSQL Backends?

Поиск
Список
Период
Сортировка
Искать
От
Srinath Reddy Sadipiralla
Тема
Question: Why Are File Descriptors Not Closed and Accounted for PostgreSQL Backends?
Дата
в 12:17:00
Msg-id
18faa8875f4.49d046c87367.7389892592798553133@zohocorp.com
Список
Дерево обсуждения
Question: Why Are File Descriptors Not Closed and Accounted for PostgreSQL Backends? Srinath Reddy Sadipiralla <srinath.reddy@zohocorp.com>
Re: Question: Why Are File Descriptors Not Closed and Accounted for PostgreSQL Backends? Heikki Linnakangas <hlinnaka@iki.fi>
Re: Question: Why Are File Descriptors Not Closed and Accounted for PostgreSQL Backends? Srinath Reddy Sadipiralla <srinath.reddy@zohocorp.com>
Hi PostgreSQL Community, 
when a backend process starts, pq_init is called where it opens a FD during CreateWaitEventSet()


if (!AcquireExternalFD())
{
/* treat this as though epoll_create1 itself returned EMFILE */
elog(ERROR, "epoll_create1 failed: %m");
}
set->epoll_fd = epoll_create1(EPOLL_CLOEXEC);


but we didn't closed or called ReleaseExternalFD() for accounting,lets say if we have multiple clients connected and are actively running queries, won't the max number of open FDs (ulimit -n) limit of the system gets reached and cause "Too many open files issue"?

Regards
Srinath Reddy



В списке pgsql-hackers по дате отправления
От: Ranier Vilela
Дата:
От: Yao Wang
Дата:
FAQ